try {
    int a = 0;
    int b = 42/a;
    System.out.print("A");
} catch (Exception e) {
    System.out.print("C");
} catch (ArithmeticException e) {
    System.out.print("B");
}
Explanation
Subclass must follow before its superclass in a series of catch-operators. If it does not, there will be an unreachable code made and a compilation error.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes