Question: How many singly - linked Node objects could the Java Virtual Machine mark as garbage after all the following statements have executed? Node n =
How many singlylinked Node objects could the Java Virtual Machine mark as
"garbage" after all the following statements have executed?
Node null;
n new NodeT;
nnext new NodeI new NodeG;
Node next.next;
mnext new NodeE new NodeR;
null;
A
B
C
D
What I understand is n T I G Then m nnext.next. So m G E R Then n null. So the answser is which is A right? If it's wrong, please give me some details.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
