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
What is balanced tree in java?
What is factor r?
Define a java class.
what methods would you overwrite in java.lang.object class?
List some oops concepts in java?
Why is stringbuffer not immutable?
What is a lambda expression ? What's its use ?
How do you define a singleton class?
What is javac_g?
How do you check if two given string are anagrams?
How are multiple inheritances done in Java?
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?
What is string pool in java?
What is the difference between serial and throughput garbage collector?
What is java english?