A full JVM stores objects and arrays in the heap, with per-thread stacks holding frames for method calls. A reference is a value that identifies an object; assigning or passing that reference does not copy the object. Two variables can therefore refer to the same mutable array. Each recursive invocation adds a frame until the method returns or fails.
Garbage collection uses reachability from roots, with details that depend on the collector. An unreachable cycle can be reclaimed; a reachable object cannot be reclaimed just because a local variable stopped using it. Class loading, linking and initialization are distinct steps. A superclass initializes before its subclass when initialization is required. These exercises use bounded state models and observable Java aliasing. TeaVM is not a JVM diagnostics tool, so no browser result is presented as a heap measurement or collector benchmark.