Quoted concept
If the type of a variable is a class type rather than a basic type, then the variable Also called a quote. In fact, GC mainly depends on whether the object has a reference pointing to the object. According to the strong and weak relationship of this reference, starting from JDK1.2 version, object references are divided into four levels, so that the program can more flexibly control the life cycle of the object. These four levels, from high to low, are: strong reference, soft reference, weak reference and virtual reference.
php Chinese website, a large number of free Java introductory tutorials, welcome to learn online!
The above is the detailed content of What is a reference in java. For more information, please follow other related articles on the PHP Chinese website!