package net.dharmaraj;
public class test
{
public static void main(String args[])
{
int i = 1, j = 1;
try
{
i++;
j--;
if (i / j > 1)
i++;
}
catch (ArithmeticException e)
{
System.out.println(0);
}
catch (ArrayIndexOutOfBoundsException e)
{
System.out.println(1);
}
catch (Exception e)
{
System.out.println(2);
}
finally
{
System.out.println(3);
}
System.out.println(4);
}
}
a) 0
b) 1
c) 2
d) 3
e) 4
Out Put:--
0
3
4
No comments:
Post a Comment