internals
26 tutorials tagged “internals”.
- ArrayList Internal WorkingHow ArrayList works inside: the internal array, default capacity of 10, growth by 1.5 times, copying on resize, and the cost of add, get and remove.
- Class Loaders in JavaClass loaders find and load classes on demand. Learn the bootstrap, platform and application loaders, the parent delegation model, and when classes are loaded.
- Compact Object Headers in Java 25Java 25 can shrink object headers from 12 to 8 bytes with -XX:+UseCompactObjectHeaders. Learn how it works, measure the savings, and when to turn it on.
- Compare-And-Swap (CAS) in JavaCompare-and-swap updates a value only if it still holds what you expect, retrying otherwise. Learn how atomic classes use CAS loops, and the ABA problem.
- The Decorator Pattern in Java I/Ojava.io adds features by wrapping streams inside other streams. Learn how the decorator pattern works there and how to write your own filter stream.
- False Sharing and @ContendedFalse sharing slows threads that update different variables on the same CPU cache line. Learn about cache lines, measuring the effect, and padding.
- Fork/Join Framework in JavaFork/Join splits big tasks into smaller ones, runs them in parallel and joins the results with work stealing. Learn RecursiveTask and parallel streams.
- Garbage Collectors in JavaCompare the JVM's garbage collectors: Serial, Parallel, G1, ZGC and Shenandoah. Learn how each works, their pauses and throughput, and how to choose one.
- HashMap Internal WorkingHow HashMap works inside: hashCode, the bucket array, index calculation, collisions, linked lists and trees, load factor, resizing, and the get and put steps.
- HashSet Internal WorkingHashSet is built on a HashMap: each element is stored as a key with a dummy value. Learn how add, contains and remove work inside, with a small rebuild.