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
Can keyword be used as identifier?
What is use of static in java?
What is time complexity java?
What is the concatenation operator in java?
What are static methods?
How does a for loop work java?
What is mean by exception?
How do you clear a method in java?
Is a method a function?
Difference between object instantiation and construction ?
How do you format in java?
Difference between notify() method and notifyall() method in java?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
Can we instantiate interface in java?
Why singleton class is used in java?