Multiple choice

Which of the following is/are true about instanceOf method in Java?

  1. It is not a method in Java.

  2. By using this method, our program can obtain runtime type information about an object.

  3. It is used for generalised routines samples.

  4. Both (2) and (3)

  5. None of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Both are the properties of instanceOf method.