Computer Science, asked by rohithvarmagoudthall, 5 hours ago

class Tester
{
public static void main(String args (1)
{
try
{
int c[] = { 1 };
system.out.println( c.length);
C[1] = 142;
system.out.println("c=" + [1] );
int a = args.length;
system.out.println("a = " + a);
int b = 8/a;
}
catch (ArithmeticException e)
{
System.out.println("Divide by 0: "+e);
}
Catch(ArrayIndexOutOfBounds Exception e)
{
system.out.println("Array index oob:" + e);
}
system.out.println("After try/catch blocks.");
}
}

Answers

Answered by pk6126569
0

Answer:

class Tester

{

public static void main(String args (1)

{

try

{

int c[] = { 1 };

system.out.println( c.length);

C[1] = 142;

system.out.println("c=" + [1] );

int a = args.length;

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

int b = 8/a;

}

catch (ArithmeticException e)

{

System.out.println("Divide by 0: "+e);

}

Catch(ArrayIndexOutOfBounds Exception e)

{

system.out.println("Array index oob:" + e);

}

system.out.println("After try/catch blocks.");

}

}

Answered by skpshravan787
0

Answer:

array out of bound experience

Similar questions