Page 1 of 1

How many singly-linked Node objects could the Java Virtual Machine mark as "garbage" after all the following statements

Posted: Sun Jul 03, 2022 11:24 am
by answerhappygod
How Many Singly Linked Node Objects Could The Java Virtual Machine Mark As Garbage After All The Following Statements 1
How Many Singly Linked Node Objects Could The Java Virtual Machine Mark As Garbage After All The Following Statements 1 (52.07 KiB) Viewed 21 times
How many singly-linked Node objects could the Java Virtual Machine mark as "garbage" after all the following statements have executed? A. 2 B. 3 C. 4 D. 5 Node n = null; n = new Node ("T"); n.next = new Node("I", new Node ("G")); Node m = n. next.next; m.next = new Node ("E", new Node("R")); n = null;