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 14 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.