0 votes
69 views
in General by (0 points)
closed by
Predict the output
What will be the output for the given code snippet
startprogram
public class Main {
public static void main(String[] args) {
try {
System.out.println(4/0);
try{
Int[] a={1,2,3};
System.out.println(a[3]);
} catch(ArrayIndexOutOfBoundsException e) {
System.out.println(“Out of bounds”);
}
}catch(ArthmeticException e){
System.out.println(“ArithmaticException : divide by 0”);
}
}
}
endprogram
closed

1 Answer

0 votes
by (0 points)
 
Best answer
ArithmaticException: divide by 0

Related questions

0 votes
1 answer 92 views
0 votes
1 answer 294 views
0 votes
1 answer 85 views
0 votes
1 answer 159 views

2.8k questions

2.8k answers

0 comments

76 users

Welcome to MCQ Village Q&A, where you can ask questions and receive answers from other members of the community.
...