Return to site

JAVA CERTIFICATION QUESTION: The hierarchy of Java exception handlers

· java

When you have multiple catch statements on a single try, which catch goes first? Which goes last?

Goven the code:

Which statement is correct? Choose one.

A. Compilation fails because the catch clause in line n2 makes the BarException handler unreachable.

B. Compilation fails because the Exception handler in line n3 is unreachable.

C. Compilation fails because the print statement in line n1 is unreachable.

D. Compilation succeeds.

·ꓷ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK