Java run-time-constant pool

Source: Internet
Author: User

Running a constant pool is part of the method area. In addition to the class version, fields, methods, interfaces, and other descriptive information, there is also a constant pool, which holds the various literal and symbolic references generated during the compilation period, which will be stored in the run-time pool of the method area after the class is loaded.

The Java Virtual machine's format for each part of the class file (which naturally also includes the Chang) is severely defined, and each byte used to store which data must conform to the requirements of the specification so that it is recognized, loaded, and executed by the virtual machine. But for running a constant pool, the Java Virtual Machine specification does not require any detail. In general, in addition to saving the symbolic references described in the class file, the translated direct references are also stored in the run-time-constant pool.

Another important feature of running a constant pool relative to a class file's const pool is dynamic, and the Java language must require constants to be generated only by the compiler, which means that the content of the constant pool in the class file is not pre-placed to run the const pool in the method area. It is also possible to put a new constant pool in the pool during the run, which is more than the Intern () method of the string class used by open people.

Java run-time-constant pool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.