Given: 1. class A { 2. } 3. class Alpha { 4. private A myA = new A(); 5. 6. void dolt( A a ) { 7. a = null; 8. } 9. void tryIt() { 10. dolt( myA ); 11. } 12. } Which two statements are correct?
Explicitly setting myA to null marks that instance to be eligible for garbage collection
Private instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.
Any call on tryIt() causes the private instance of A to be marked for garbage collection.
There are no instanced of A that will become eligible for garbage collection.