private static native voidregisternatives(); static{
registernatives ();
}
The associated C function, similar to the C function, is imported into Guolai so that you can call the C function, and the main import function isStatic Jninativemethod methods[] = {
{"Hashcode", "() I", (void *) &jvm_ihashcode},
{"Wait", "(J) V", (void *) &jvm_monitorwait},
{"Notify", "() V", (void *) &jvm_monitornotify},
{"Notifyall", "() V", (void *) &jvm_monitornotifyall},
{"Clone", "() Ljava/lang/object;", (void *) &JVM_Clone},}; So when these methods are called, they are actually called C functions
hashcode ();
According to the Java contract specification, each object should have a hashcode value, mainly used to support the hash table, you can consider this problem, how to ensure that the hash value of each objects close to non-repetition
Cloneclonenotsupportedexception;
By convention, this method is to return a copy of an object, which is equivalent to re-copying the object in memory, to study the depth of the copy.
Finalizethrowable {}
The Java garbage collection mechanism specifies the method that must be called before an object is destroyed.
some of the other methods are primarily thread-related
in summary, the Object class is primarily a basic implementation of Java Conventions
Java Object class Analysis