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

Answer Posted / tulsi

Garbage collection means deallocation of variables,which
are of no use(variables that wont be usefull in future).It
is a automatic process that occurs during the execution of
your program. In other lanuages this facility is not
provided, we have to do it mannually where as java provides
this process known as garbage collection.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is ruby built on java?

535


What are adapter classes?

601


How do you implement polymorphism in our day to day life?

2763


What is local class in java?

524


What are the restriction imposed on a static method or a static block of code?

596






What is the difference between a field variable and a local variable?

574


Is stringwriter thread safe?

557


Difference between Preemptive scheduling vs. Time slicing?

574


How many bytes is double?

549


What happens to a static var that is defined within a method of a class?

550


What is object data type?

569


What is the function of static in java?

543


What is a flag variable?

561


Can we change the value of static variable?

502


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

563