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

What is mean by collections in java?

0 Answers  


What is a java applet? What is an interface?

0 Answers  


jdbc drivers?

8 Answers   Wipro,


what is mean by thread lock?

2 Answers   Infosys, TCS,


Can a class have more than one object?

0 Answers  






Can memory leak in java?

0 Answers  


What is the difference between serializable and externalizable interfaces?

0 Answers  


What is difference between checked and unchecked exception in java?

0 Answers  


Difference between character constant and string constant in java ?

0 Answers  


In how many ways we can the thread? in java

3 Answers  


what is bmg file and how to create that files?what will it contailn?

0 Answers   HCL, Probe Services,


What is ternary operator? Give an example.

0 Answers  


Categories