Java Object getClass() MethodgetClass() is the method of Object class. This method returns the runtime class of this object. The class object which is returned is the object that is locked by static synchronized method of the represented class. SyntaxReturnsIt returns the Class objects that represent the runtime class of this object. Example 1Test it NowOutput: Class of Object obj is : java.lang.String Example 2Test it NowOutput: Class of Object obj is : java.lang.String
Next TopicJava Object Class
|