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

Answer Posted / janet

When an object is no longer referred to by any
variable,java automatically reclaims memory used by that
object.This is known as garbage collection.
System.gc() method may be used to call it explicitly.

Is This Answer Correct ?    180 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is called module?

561


Where is the singleton class used?

581


Is string is a data type?

568


What does exp mean in math?

529


What causes memory leaks in java?

490






How many bytes is a string in java?

528


What are locale settings?

550


Are there structures in java?

552


What is data and its types?

571


what are the methods in object?

633


Is java hashset ordered?

575


Explain the difference between protected and default access.

512


What are the rules for variable declaration?

499


Is array serializable java?

515


Define packages in java?

576