Java.lang.Object
The object class is the base class for all other classes in Java, and all other classes inherit the base class by default, and the methods in that class are 13, as follows
Registernatives () method
Private Static native void registernatives (); Static { registernatives (); }
This method is decorated by native, which means that the method is not implemented in Java, but is done by C + +, and we do not need to pay attention to this method for the time being.
GetClass () method
Public Final native Class<?> getclass ();
The method returns a Class object/Runtime class object for object class<?>
Hashcode () method
Public native int hashcode ();
The Hashcode () method returns an integer that represents the hash code value of the object.
For the same object, the hash code value of the object is returned with the same
Equal (Object obj) method
Public Boolean equals (Object obj) { return ( this = = obj); }
Used to determine whether two objects are equal
ToString () method
Public String toString () { return getclass (). GetName () + "@" + integer.tohexstring (Hashcode ()); }
Returns the string representation of the object, typically overriding the change method
Clone method
protected native throws Clonenotsupportedexception;
Used to create and return a copy of this object, actually returning a reference to the object, pointing to the new clone object, which occupies a different memory space than the original object
Finalize () method
protected void throws Throwable {}
This method is mainly related to garbage collection, we do not need to care about this method for the time being
Java source-object