for example, the member variable of a class:
Object obj = new Object();
obj is an instance of an object. In a broad sense, it is stored on the "stack" and points to the memory address on the "heap". Specifically, I have the impression that obj should be stored on the virtual machine stack (VM Stack) in the runtime data area.
I know that the virtual machine stack stores stack frames:
A complete stack frame contains: local variable table, Operand stack, dynamic connection information, method normal completion information and method exception completion information.
in which the local variable table is stored again:
Thelocal variable table stores various basic data types known at compile time, object reference type , and returnAddress type (address pointing to a bytecode instruction: function return address).
the question is that the life cycle of stack frames that go on and off the stack with the execution of the method should be very short, so is the obj mentioned above stored in the local variable table in the stack frame as a reference to the object and a member variable of the class? In addition, where are the parameters of a function stored? is it also a local variable table?