Please explain why Exception comes in first program but not in second program.
1) without return statement in read method
class Example
{
public s
The reason is given in the Java Language Specification rules governing the execution of try/finally blocks. Essentially
An explicit return
is considered abrupt rather than normal completion, so in your example 2 the return inside the finally masks the divide-by-zero exception raised by the try.