Oracle Certified Associate Java Se 8 Programmer · Free Practice Question Hard

Question 1

Consider the code:

What is the result?

  • A

    ABCF

  • B

    Compilation Fails.

  • C

    ArithmeticException is thrown at runtime.

  • D

    ABCDEF

Reveal correct answer

Correct answer: D

Explanation

Inside try block ArithmeticException raised and handled. Hence every print statement will be executed. Hence the output is: ABCDEF

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need