class
Test {
public static void main(
String args[])throws Exception
{
try
{
int x=5/0;
}
catch(IllegalArgumentException e)
{
System.out.println("IllegalArgumentException");
}
catch(ArithmeticException e)
{
System.out.println("ArithmeticException");
return;//if u use return the Last Line wont execute
}
catch(Exception e)
{
System.out.println("Exception");
}
finally
{
System.out.println("In finally");
}
System.out.println("Last Line");
}
}
here i am using return inside the catch block .by using this i am unable to display the Last Line can any one explain why it happens like that???
and one more doubt if i wont use return why it displays Last Line ?? actually the program execution must halt at arithmetic exception catch block and it must then display finally.. why it is agian displaying Last Line??
lease can any one clear my simple doubt
thanking you in advance