Multiple choice

What is the role of getClass() method of the Object class in Java?

  1. This method is a final method that returns a runtime representation of the class of this object.

  2. This method returns a String representation of the object.

  3. This method compares two objects for equality.

  4. This method creates a clone of this object.

  5. None of the above

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

This is true about getClass() method.