How is the Object class implemented (methods like hashCode and internal fields)?
问题 I am curious how is the Object class implemented. For example a method hashCode() or wait() How is the internal state represented. For instance, an instrinsic lock or the data structure for storing threads that called object's wait(). In order to find these out, I have downloaded a source of OpenJDK and started to dig in. First thing, I came across was \openjdksrc\jdk\src\share\native\java\lang\Object.c file, containing, among others: static JNINativeMethod methods[] = { {"hashCode", "()I",