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

Question 32

What will be the result of compiling and executing Test class?

  • A

    MNO

  • B

    MOP

  • C

    MNP

  • D

    NOP

Reveal correct answer

Correct answer: A

Explanation

M

^

N

^

O [obj refers to instance of O class]

^

P


obj instanceof M -> true

obj instanceof N -> true

obj instanceof O -> true

but

obj instanceof P -> false

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