Personal understanding of symbolic references and direct references in Java virtual machines
Source: Internet
Author: User
In Java, a Java class will be compiled into a class file. At compile time, the Java class does not know the actual memory address of the reference class, so only symbolic references can be used instead. For example, the Org.simple.People class references the Org.simple.Tool class, and the people class does not know the actual memory address of the Tool class at compile time, so only the symbolic org.simple.Tool (assuming) can be used to represent the address of the Tool class. When the class loader loads the people class, you can get the actual memory address of the tool class from the virtual machine, so you can replace the symbol Org.simple.Tool with the actual memory address of the tool class and the direct reference address.
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.