Stack vs. Heap & Object References
Visualize why primitives copy values while object variables copy memory addresses, how pass-by-value works in method calls, and what triggers a NullPointerException.
- ① Primitive vs. ReferenceAliasing
- ② Aliasing & ReassignmentOrphaned Heap
- ③ Pass-by-Value (Methods)Call Stack
- ④ null, NPE & Garbage CollectionInteractive GC