Java
234 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- transienthistorical
Used during serialization. Fields marked transient are not serialized; after deserialization they take their initial values such as null or 0.
- Cloneable and Object.clonehistorical
1. What the Cloneable interface is. 2. What object cloning is. 3. How to implement object cloning: shallow cloning and deep cloning. 4. References.
- 5.2 Integerhistorical
Usage and implementation analysis of Integer, including immutability, valueOf, IntegerCache, and autoboxing behavior.
- 5.3 ArrayListhistorical
What ArrayList is, how to use it, and source analysis of construction, add, remove, resizing, and fail-fast behavior.
- 5.4 Hashtablehistorical
What Hashtable is, how to use it, and source analysis of construction, synchronized put/get/remove/containsKey, hashing, chaining, and rehashing.
- Objecthistorical
Methods on Object, the equals/hashCode contract, and the difference between wait and sleep.
- PriorityQueuehistorical
1. What PriorityQueue is. 2. Usage. 3. Source analysis: fields, constructors, heapify, insertion, deletion, sift-up, and sift-down. 4. Reference.
- 5.7 Serializablehistorical
Serialization and deserialization in Java, custom readObject/writeObject hooks, implementation flow, serialVersionUID, and serialization algorithm.