A d = new A().aob =new A();
This is the key line here. There is one object eligible for GC here. The object in bold is actually assigned to d and the object in italics is eligible for GC...
d points to the last object created with new A(), not the object created with new A().aob.
Object new A.aob is eligible to gc since there is no reference that points to it.
And the total number of objects eligible for gs is 2.
Apologies Devaka wrong word i must say. Not open-source.
To my knowledge, before somtime, ExamLab was free , i am not really sure if you have updated it at commercial level.
Let me know.