Site hosted by Angelfire.com: Build your free website today!

class pro3

{

public static void main(String args[])

{

int a=args.length;

int b=42/a;

System.out.println("a= "+a);

System.out.println("b= "+b);

try

{

if(a==1)

a=a/(a-a);

if(a==2)

{

int c[]={1};

c[42]=99;

}

}

catch(ArrayIndexOutOfBoundsException e)

{

System.out.println("Array index out of-bounds");

}

catch(ArithmeticException e)

{

System.out.println("Arithmetic Exception");

}

}

}