This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Hello everybody, I've got a simple doubt regarding reachable and unreachable statements. can anyone explain me the difference between the two as i am pretty confused with the logic. For ex if i execute the following code....
if i execute the above code i get a comple error at line 2 saying the line is unreachable...but if interchange both line 1 and 2 it works fine. can anyone throw light on this.Thanks in advance.
posted 13 years ago
At line 1 in the catch bloack u have a return statement, which effectively trasnfers control out of the method so line 2 is not reachable.