Can an object be garbage collected while it is still
reachable?

Answers were Sorted based on User's Feedback



Can an object be garbage collected while it is still reachable?..

Answer / ravikiran(aptech mumbai)

yes...all the garbage ollection things depends on the
garbage collector of JVM

Is This Answer Correct ?    1 Yes 1 No

Can an object be garbage collected while it is still reachable?..

Answer / sudheer

Garbage collector is a low priority thread. We cant order to delete an object. When the object has no references and object which are out of scope will be deleted by the garbage collector to free the memory. So when an object is reachable it cant be garbage collected.

Is This Answer Correct ?    1 Yes 1 No

Can an object be garbage collected while it is still reachable?..

Answer / janet

Once an object is garbage collected, it ceases to exist. It
can no longer become reachable again.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Core Java Interview Questions

Explain the difference between abstract classes and interfaces in java?

0 Answers  


What do you understand by abstract classes?

0 Answers   HCL,


How much is a java license?

0 Answers  


What is constant in programming?

0 Answers  


what is difference between method overloading & method overridding with example?

4 Answers   IBM,






What is difference between class and object in java?

0 Answers  


What does the @override annotation do?

0 Answers  


Why do we need to override equals() and hascode() method of object class?

1 Answers   Cognizant,


What is JVM and is it platform independent?

0 Answers  


what is the need of the Ajax?

5 Answers   iFlex,


why doesn't java run on all platforms?

0 Answers  


what are class,constructor and primitive data types?

2 Answers   IBM,


Categories