This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I tried this out and your are correct! I am guessing here that the Java compiler is smart enough to see that in the doIt() method, the control flow never gets past the throw statement, so it doesn't care about the return value (because it would never be reached anyways). This may be more of an issue with the sourcecode parser then the java language? Anyone got an idea on this one??
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes