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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is balanced tree in java?

524


What is factor r?

513


Define a java class.

786


what methods would you overwrite in java.lang.object class?

555


List some oops concepts in java?

572






Why is stringbuffer not immutable?

553


What is a lambda expression ? What's its use ?

557


How do you define a singleton class?

493


What is javac_g?

582


How do you check if two given string are anagrams?

543


How are multiple inheritances done in Java?

612


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

595


What is string pool in java?

553


What is the difference between serial and throughput garbage collector?

569


What is java english?

483