Object Class (root class), object class
The methods in the Object are all methods in the class. Each class inherits the Object class by default.
Boolean equals (Object obj): the default comparison address in the Object. You can override the equals (Object obj) method to compare the content.
String toString (): returns the String representation of this object, object. toString ();
The result is the hash value of the class to which the object belongs plus @ object (getClass (). getName () + '@' + Integer. toHexString (hashCode ())).
Int hashCode (): Get the object's hash value. The result is an Integer. Use Integer. toHexString (object. hashCode (); convert it to hexadecimal.
Class <?> GetClass (): returns the runtime class of the Object, an Object of the Object class.
For Class <?> Understanding: The Person class is the abstract of a Person, and the third and fourth are the concrete implementations of a Person. getName () is a common method of a Person,
The Class can be regarded as Person, A. class, and B. class. getClassName () gets the Class name.
It is equivalent to abstracting all Class files into class classes. Class files of specific classes are implemented, and class classes have common methods for specific Class files.