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

What are inbuilt functions in java?

573


What do you mean by buffering?

567


How can you traverse a linked list in java?

698


What is the formula to calculate percentage?

543


Explain the significance of class loaders in bootstrap?

514






What is exception in java?

577


What is method overloading in JAVA? Why is it not present in C ?

600


How to display arraylist values in java?

499


What is a linkedhashmap java?

572


What is the public field modifier?

551


What is the purpose of default constructor?

597


How to convert string to char and vice versa?

530


What is main function purpose?

537


Is java a virus?

550


What is contractor means and methods?

570