In Java, unreachable code is treated as compilation error. What do you think? Isn’t making it warning would have made developers’ life simpler?
Of course you can write –
if( true )
What if you could simply write return. This helps in testing a function quickly. As a good programming practice we always remove all warnings from code, and such unconditional return statements can be rectified later.
- Best Geek Quotations
- Buzzword: Cloud Computing