0

How many objects eligible for garbage collection?

After the following code snippet is run, how many objects are not eligible for garbage collection? Assume that before the snippet was run, there were no objects created. Dog A = new Dog(); Cat B = new Cat(); Dog C = new Dog(); Cat D = new Cat(); Dog E = new Dog(); Cat F = new Cat(); A = C; C = E;

16th Oct 2017, 2:28 PM
Shubham Kr Singh
Shubham Kr Singh - avatar
1 Odpowiedź
0
5
12th Nov 2017, 2:37 AM
Kirk Solano
Kirk Solano - avatar