GIAC
GSSP-JAVA · Question #24
GSSP-JAVA Question #24: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #24. The question stem and answer options stay visible for context.
Question
Mark works as a Programmer for InfoTech Inc. He creates a program that uses the following code. 1. class Book 2. { 3. Short f1= 15; 4. Book GetDetails(Book b1) 5. { 6. b1=null; 7. return b1; 8. } 9. public static void main(String args[]) 10. { 11. Book b1 = new Book(); 12. Book b2 = new Book(); 13. Book b3 = b1.GetDetails(b2); 14. b1=null; 15. //code 16. } 17. } How many objects will be eligible for garbage collection when line 15 is reached?
Options
- AIt cannot be determined.
- B1
- C2
- D0
Unlock GSSP-JAVA to see the answer
You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.