According to the JVM specification, JVM memory is divided into five parts: Virtual machine stack, Heap, Method area, Program counter, Local method stack.
Before Java7, the static variables of the class (referred to as class variables, such as the staff you wrote) were stored in the permanent generation (PermGen) - on the Hotspot JVM, PermGen is the method area; after Java7, the storage of class variables was transferred to the heap .
For more details about the JVM memory model, please refer to Zhou Zhiming's "In-depth Understanding of Java Virtual Machines Second Edition"
According to the JVM specification, JVM memory is divided into five parts: Virtual machine stack, Heap, Method area, Program counter, Local method stack.
Before Java7, the static variables of the class (referred to as class variables, such as the staff you wrote) were stored in the permanent generation (PermGen) - on the Hotspot JVM, PermGen is the method area; after Java7, the storage of class variables was transferred to the heap .
For more details about the JVM memory model, please refer to Zhou Zhiming's "In-depth Understanding of Java Virtual Machines Second Edition"
Objects created using new are all in the heap.