the fallowing first example is from jxam or jargon the out put does not include " End processing " why ? but second example from Khalid and Rolf example gives an out put which includes " Returning from division." which is at the same place as "End processing" of above example ?
first example :- import java.io.*; import java.net.*;
Hie kameshwar, I think you need to recall that "return" is a "Flow Control Transfer" statement.Control transfer statements are those statements that transfer the flow of control from the current position to some other position. Return, transfers the flow from a method to where the method was called from.So the presence of "return" in the catch block of the first example makes control to move from this method altogether, and thus the last line is not executed.Notice that "return" is not present in the catch block of the second example. Try to verify this by removing "return" from the catch block of the first example and see if it behaves differently. Regards, Herbert.