JAVA INTERNALS, DRAWN LIVE

Three lines. One interview question.

Run them and watch the memory figure react. This is how every concept here works.
1Person a = new Person("Ada");
2Person b = a;
3a = null;
STACK
a · Person
◆ ref
b · Person
◆ ref
HEAP
PERSON
name = "Ada"
FIG 0Nothing exists yet. Run line 1.
Progress saves on this device. More concepts are in build; the prep index shows the whole path.