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

Answer Posted / jaffer

Actually garbage collector is a daemon thread. Normally
JVM’s heap stores all objects which is created by new
operator. So objects are occupying memory in heap. Some
objects are not used for long time. So garbage collector do
that work automatically.
Otherwise we call finalization method

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of :: in java?

555


How would you use Bubble Sort to sort the number of elements?

568


Can an object subclass another object?

545


Can a final variable be manipulated in java?

518


What is tcp ip in java?

574






What are "class access modifiers" in Java?

592


What is lazy programming?

547


Explain what pure virtual function is?

581


What is difference between checked and unchecked exception in java?

555


Can we nested try statements in java?

606


What is a nullable field?

562


What is the multi-catch block in java?

522


What do you mean by mnemonics?

515


Variables used in a switch statement can be used with which datatypes?

505


Is sizeof a keyword in java programming?

592