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

Answer Posted / siva

Garbage collection is a thread, that runs to reclaim the
memory by destroying objects which object is cannot be
referenced anymore.
instead of calling destructor JVM do it automatically, as we
use destructor in c++ to destroy the object

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of control structures?

576


What does provide mean construction?

642


Do you need to import math in java?

654


How do you initialize an arraylist in java?

607


What is methodological framework?

670






What is the use of list in java?

612


What is meant by call by reference?

602


What is jar?

709


What do you understand by java?

653


What is the purpose of file class?

649


Can we extend immutable class?

637


Can we use String with switch case?

748


What happens if an exception is throws from an object's constructor?

733


Write a program to print the pattern given below

597


What is difference between length and length() method in java ?

657