Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does the java method area include and what does the constant pool include?
What does the java method area include and what does the constant pool include?
The method area stores the information of class file and dynamic constant pool, and the information of class file includes class information and static constant pool. Class information can be regarded as a framework of class file content, in which the specific content is stored through a constant pool.

The content in the dynamic constant pool is not only the content in the static constant pool, but also converts the symbol references in the static constant pool into direct references, and the content in the dynamic constant pool can be added dynamically. For example, by calling the intern method of String, the value of String can be added to the String constant pool, which is included in the dynamic constant pool, but after jdk 1.8, the string constant pool is put into the heap.