Java1.8 based learning, class Object

Object class presentation

Object class is the ancestor of all Java classes. Each class uses Object as a superclass. All objects (including arrays) are implemented method of this class.
Without explicitly given superclass, Java will automatically be defined as the superclass Object class.
Any type of pointing object may be used as a variable type Object.
Object class has a default constructor pubilc Object (), at the instance of the class constructor will first call the default constructor.

View source

public class Object {

    private static native void registerNatives();
    static {
        registerNatives();
    }

    // 返回该对象对应的Class对象
    public final native Class<?> getClass();

     // 
    public native int hashCode();

Guess you like

Origin www.cnblogs.com/feiqiangsheng/p/10990468.html