A picture wins thousands of words, the following illustrations are from the program Creek Web site Java tutorial, currently they have the most votes. If the plot does not explain the problem, then you can use its title to get a glimpse of it.
1. String invariance
Here's a picture showing what this code does
12 |
String s = "abcd" ; s = s.concat( "ef" ); |
2. The difference between the Equals () method and the Hashcode () method
Hashcode is designed to improve performance. The difference between the Equals () method and the Hashcode () method is that:
- If two objects are equal (equal), then they must have the same hash value.
- If two objects have the same hash value, they may not be equal (equal).
3. Hierarchy of Java exception classes
The red part of the figure is checked for exceptions. They must be caught, or declared in the function to throw the exception.
4. Hierarchical structure of collection classes
Notice the difference between collections and collection. (collections contains a variety of static polymorphism methods for set operations)
5. Java Synchronization
The Java synchronization mechanism can be illustrated by analogy to buildings.
6. Aliases
An alias means that there are multiple variables pointing to the same block of memory that can be updated, respectively, with different object types.
7. Heap and Stack
The plot shows the location of the method and the object in memory at run time.
8. Data region of Java Virtual Runtime
The illustration shows the situation of the data region when the entire virtual runtime is running.
Original link: Programcreek translation: Importnew.com-era_misa
Link: http://www.importnew.com/11725.html
8 Images Understanding Java