What is garbage collection in Java, and how can it be used ?

Answer Posted / sandeep chaudhary

garbage collection is just a thread that is used for
deallocation of object.object in java are allocated in
heap area(memory ) ,particular object is not used for long
period then automatically garbage coolection calls this
object for destroyed.........

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to persist data of objects for later use. What’s the best approach to do so?

498


What is the basic concepts of OOPS?

684


What is a text string?

613


What are heap memory and stack memory and what are memory tables.

505


What is the use of set in java?

610






Which is better ascii or unicode?

564


what is synchronization and why is it important? : Java thread

584


Does java have a compiler?

553


What is the difference between char and char *?

563


Can a class be private in java?

539


How do you ensure that n threads can access n resources without deadlock?

809


What are the advantages of java over cpp?

551


What is native code?

533


What is singleton class in java and how can we make a class singleton?

568


Can you explain the private protected field modifier?

567