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
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
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
NO1.Where is Chang in the class file?
My previous article "schematic diagram of Java Virtual machine" 1, class file basic organizational structure has mentioned the class file structure, in the class file, after the magic number, the
The constant used to learn php at the front end and the constant used to learn php* Directory [1] definition constant [2] constant detection [3] system constant [4] before magic constant
Constants do not exist in javascript. in php, they are
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.
What is a class constant? What we can understand in PHP is that the value is constant, so what is a class constant? In fact, the class constants are also easy to understand, we can always keep the constant value of the class is called constants, and
Pointer to a constant, pointer constant, pointer constant to a constantThe first character is often called a constant pointer. They correspond to the following situations: const int * PI; or Int const * pi; int * const PI; const int * const PI;
Touch Java constant Pool
Java constant pool is an enduring topic, but also the interviewer's favorite, the topic is full of patterns, the side dishes have already heard of the constant pool, this time a good summary.
Theory
A piece of cake first.
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.