Your Porgram is correct.It would be more accurate if you
use "java.lang.ArithmeticException " instead of generic exception.
Because you are of exception goin to occuer.
The exception get caught and the control goes to the catch block. it
finds only return statement. so it comes out of the programme and so
only to the command prompt.the follwoing example (little modification
of your prog) would lt you to understand better.
class test
{
public static void main(String a[])
{
try
{ int i=2;
int j=i/0;
}
catch(java.lang.ArithmeticException e)
{
System.out.println("I have caught exception "+e);
return;
}
}
}
let me know if you have any other query