If I create a class like:
public class Test{
int id;
String name;
}
Now, i开发者_运维问答f I have to use the class, we have to just create a instance of the class as
Test testObj = new Test();
I would like to know how the actual object is created in the system. (In core level, what will be the structure of the object.)
This depends on the actual virtual machine (vendor, version). There's no detailed specification on how a VM should store the instance.
The Java virtual machine does not mandate any particular internal structure for objects.
精彩评论