Question: ? What is the output of the below code 1 public class Test { public static void main ( String [ ] args ) {

? What is the output of the below code
1 public class Test {
public static void main(String[] args){26
3
try {
int a[]= new int[5];
System.out.print("1"); System.out.print(a[10]);
System.out.print("2");
} catch (ArithmeticException e){
System.out.print("3");
} catch (Exception e){
System.out.print("4");
} finally {
System.out.print("5");
}
System.out.print("6");
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!