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

Answer Posted / rana.ankur

Garbage collection is a method of jvm.In JAVA when object
iis not use in otherway there is no refrence to that object
it is ellegible for Garbage collection.

demon thread is used and its is known as Garbage
collectior..
and finalize method are also invoke to give last chance to
object to save it imprtant data..thanking you

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an eror in java?

559


What is the difference between Java and C++?

615


What is use of arraylist in java?

581


What is the difference between I ++ and ++ I in java?

507


Why convert an applet to an application?

620






What is the difference between multitasking and multithreading in Java

724


What is string pool?

629


Why declare Main() inside the class in java ?

607


What is the use of volatile in java?

602


Define jit compiler?

662


Differentiate between stringbuffer and string?

599


Explain the difference between treeset and treemap in java?

532


What is better - 'bit-shift a value' or 'multiply by 2'?

701


What causes memory leaks in java?

491


Which list does not allow duplicates in java?

514