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

Answer Posted / syed sikandar bakht

when an object in memory is no longer refered by a variable,
the garbage collector automatically move it to garbage
collection.
instead of calling destructor JVM do it automatically, as we
use destructor in c++ to destroy the object.

Is This Answer Correct ?    20 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

650


What is the transient keyword?

855


What is variable length arguments in java?

616


What are triggers in DB? Explain their types. How do they work?

718


What are java packages?

690






How to print nodes of a Binary tree?

1857


What is use of valueof () in java?

661


How can you say java is object oriented?

708


What is api data?

639


Does constructor be static?

665


What is integers and example?

585


What is the final keyword?

640


What is annotation in java?

680


What is comparator in java?

646


What is main string [] args?

605