Sometimes a diagram replaces 1000 words. The following diagram is from Program Creek 's Java guide , and is the most voted on that site. I hope it helps you better understand what you already know. If the diagram is not clear, you can go to the original article and read the details. 1. String immutability Data immutability is the inability to change data after it has been created in memory. The following diagram shows what happens when the given code is executed:
2.
Differences between equals() and hashCode() HashCode was created to improve performance. However, there is a difference between equals() and hashCode(): 1. If 2 objects are equivalent, they have the same hash. 2. If 2 objects have the same hash, they may or may not be equivalent.
3.
Hierarchy of Java exception classes. Red highlighted exceptions that must be handled or declared in the method that throws them.
4.
Hierarchy of collection classes. Notice the difference between Collections and Collections. Collection is the root
interface in the collections hierarchy. Collections -
A class that contains static methods that operate on and return collections.
5.
Java synchronization. The synchronization mechanism in java can be illustrated using a building as an example. (Special room, waiting room, lobby)
6.
Antialiasing Antialiasing means that there are multiple aliases in a place that can be updated, and these aliases are of different types.
7.
Stack and heap This diagram shows where methods and objects are located in RAM during program execution.
8.
Data layers in the JVM during operation. The diagram shows shared data areas while the JVM is running.
Link to original Translated
String s = "abcd"; s = s.concat("ef");
GO TO FULL VERSION