How is Garbage collection done in Java?

Answer Posted / boomiraj

Programmer can not cause the garbage collector.
We can call the garbage collection using System.gc();
And we can set the variable value equal to null, it assign that variable garbage rest the that use.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why array is used in java?

735


Difference between Linked list and Queue?

812


Difference between static binding and dynamic binding?

810


Is simpledateformat safe to use in the multithreaded program?

778


What is meant by nested loop?

813


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

968


What means public static?

812


Is it possible to compare various strings with the help of == operator?

778


What is the best definition for data?

742


Can main() method in java can return any data?

920


How can a gui component handle its own events?

835


When do we need to use internal iteration? When do we need to use external iteration?

861


What is difference between equal and == in java?

743


What are JVM.JRE, J2EE, JNI?

905


What is the platform?

772