Sometimes a picture is more than words. The following figure is a Java tutorial from Program Creek, the most popular article so far. I hope these graphs can help you to review the knowledge you have learned. If you can't figure out the problem through these graphs, you may want to read the detailed articles to further learn Java
1, the invariance of the string (http://www.9ymw.com/high-quality code download)
The following illustration shows a code run procedure as follows:
String s = "ABCD"; s = S.concat ("EF");
Note: String reference variable: String reference Variable String object: String objects
2, Equals () and hashcode () of the relationship (http://www.9ymw.com/high-quality code download)
Hash codes are designed to improve performance. The relationship between Equals () and Hashcode () is:
2.1 If two objects are equal, they must have the same hash code.
2.2 Even if two objects have the same hash code, they are not necessarily equal.
Note: hash function: Hash functions buckets: hash bucket
3, the Java Exception class hierarchy (http://www.9ymw.com/high-quality code download)
A red-colored box is a check exception that must be thrown by capturing an exception in a Try-catch code block or by Thorws in a method.
4, the collection class hierarchy (http://www.9ymw.com/high-quality code download)
Note the difference between collections and collection:
Note: Collection: is the top-level interface of the collection class hierarchy.
Collecitons: This class consists of static methods and collection objects that manipulate the collection object.
5, Java Synchronization mechanism (http://www.9ymw.com/high-quality code download)
The Java synchronization mechanism can be illustrated by a building:
Note: Special room: Special Room wait room: Waiting room Hallway: Corridor
6, the reference alias mechanism (http://www.9ymw.com/high-quality code download)
The reference alias mechanism means that multiple references can be positioned to the same memory address that can be updated, and these reference variables can be of different types.
7, Stack and heap (http://www.9ymw.com/high-quality code download)
The following figure shows where the methods and objects are stored in memory at run time
Note: stack: Stack Heap: Heap
8, Java Virtual run-time data region (http://www.9ymw.com/high-quality code download)
The following figure shows the data region of the Java Virtual Runtime population
Note: Thread: Threads PC Register: Program counter JVM stack:java virtual machine stack
Native method Stack: Local methods Stack Heap: Heap Approach Area: Methods zone: Runtime Constant pool: Run a constant-time pool (http://www.9ymw.com/high quality code download)