Write a program to Multiple catch blocks.

class Multicatch
{
public static void main(String args[])
{

try
{
int a=args.length;
System.out.println(" "+a);
int b=32/a;

int c[]=new int[5];
c[]=
}
catch(ArithmeticException e)
{
System.out.println("Ist catch"+e);
}
catch(ArrayIndexOutofBoundException e)
{
System.out.println("IInd catch"+e);
}
System.out.println("after catch");
}
}

No comments:

Post a Comment