3.2.2 Constantsand variables can be used in the program to express those that may change the amount of data corresponding to, in C + +, we use constants to express those always remain unchanged data volume. In simple terms, the values, characters,
In-depth exploration of Java constant pool and java constant pool
Java constant pools are generally divided into two types: static constant pools and runtime constant pools.
Static constant pool: constant pool in the class file. The constant pool in
3.2.2 Constantsand variables can be used in the program to express those that may change the amount of data corresponding to, in C + +, we use constants to express those always remain unchanged data volume. In simple terms, the values, characters,
JVM learning notes directory:
Analysis of the Class file structure on the path of JVM exploration (1): Format and definition of Class files
JVM exploration path Class file structure parsing (3): access modifier, Class index, parent index, and
Objective:
In peacetime we use the string is generally used to get directly, very little in-depth to think about this knowledge , leading to others in the examination of our time, will ask the string str = new String ("123"); This line of code
First
Quoting a sentence "The result of code compilation from local machine code to bytecode is a small step in the development of the storage format, but a big step in programming language development", this sentence contains the essence of
Before writing, we will look at a few questions, if you have a good understanding of these issues, it can not read this article, if you do not understand, then you can look at my thoughts.Question 1:
public static void main(String[] args){ String
Java String and constant pool, JavaString constant pool
String is a string in java. The String class is unchangeable. Any change to the String class will return a new String class object.
1. First, String does not belong to eight basic data types.
I. Related Concepts
What is a constantA constant is represented by a final modified member variable, which cannot be changed once the value is given!There are three final modified variables: Static variables, instance variables, and local
This essay is reproduced, the original paste address: Java constant pool understanding and summary.(In fact, Java's Chang is a bit like the constant store of storing string constants in C + +).I. Related Concepts
What is a constantA
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.