| Author |
Question for varargs for array and garbage collection |
PujaR Agarwal
Greenhorn
Joined: Mar 30, 2009
Messages: 14
|
posted
|
The following is from Mr. Devaka's ExamLab SCJP Simulator :
Practice Exam 1, question 42:
How many objects are eligible for the Garbage Collector, after executing the line-9 of this programm. F.Y.I: Array is an object.
According to ExamLab the answer is: 0
This problem is already discussed here but one forum is showing answer 1 and one is showing 0. which is true ? Can anyone help me.
Solution 1 :http://www.coderanch.com/t/418039/Programmer-Certification-SCJP/certification/about-Garbage-Collection-from-ExamLab#1843490
Solution 2 : http://www.coderanch.com/t/431013/Programmer-Certification-SCJP/certification/Devak-ExamLab-Garbage-Collection#1914089
Thanks
Puja
|
 |
Devaka Cooray
Bartender
Joined: Jul 29, 2008
Messages: 1378
|
posted
|
|
When did you download examlab? Before April, or After April?
|
Author of ExamLab - the free mock exam kit for SCJP
[Home Page] . [Twitter Profile] . [JavaRanch FAQ] . [How to Ask a Question] |
 |
PujaR Agarwal
Greenhorn
Joined: Mar 30, 2009
Messages: 14
|
posted
|
|
I downloaded examlab after april only but it is showing 19/4/09 version.
|
 |
Devaka Cooray
Bartender
Joined: Jul 29, 2008
Messages: 1378
|
posted
|
PujaR Agarwal wrote:I downloaded examlab after april only but it is showing 19/4/09 version.
Then please read the question again:
How many "objects of Gabc class" are eligible for the Garbage collector, after executing the line-9 of this program?
The correct answer is 0 in this case.
(There was a small error in the previous version)
|
Author of ExamLab - the free mock exam kit for SCJP
[Home Page] . [Twitter Profile] . [JavaRanch FAQ] . [How to Ask a Question] |
 |
PujaR Agarwal
Greenhorn
Joined: Mar 30, 2009
Messages: 14
|
posted
|
|
Thanks Devaka to make it clear.
|
 |
 |
|
|
|