Multiple choice

Which of the following methods of Object class is used to obtain a Class object that describes the invoking object?

  1. hashCode()

  2. notify()

  3. toString()

  4. getClass()

  5. equals()

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

This method of Object class is used to obtain a Class object that describes the invoking object.