How to send a request to garbage collector?

Answers were Sorted based on User's Feedback



How to send a request to garbage collector?..

Answer / nilesh bhil

Garbage collector is automatically called by JVM.
But can make the request by calling gc() method on System class as follows.
System.gc();
Note that we are making only request Garbage Collector may
called or may not called.
Garbage Collector is automatically called at two conditions.
1)When CPU is ideal.
2)When huge amount of memory is required.

Is This Answer Correct ?    6 Yes 0 No

How to send a request to garbage collector?..

Answer / viiraj

Garbage collection is implicitly accomplished with
termination of instance.
Wee dont need to explicitly request.

Is This Answer Correct ?    4 Yes 2 No

How to send a request to garbage collector?..

Answer / manikandan [ gtec,vellore ]

we can't force a garbage collection.it automatically runs
when system runs out of memory.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Advanced Java Interview Questions

Difference between sleep and suspend?

3 Answers  


What is the infobus?

0 Answers  


What is the difference between RMI registry and OS Agent?

0 Answers  


Explain Life cycle of Servlet Filter.

2 Answers   InfoBrain, ITC Infotech,


What is the need of serialize?

2 Answers   Wipro,






What method is used to create the daemon thread?

1 Answers  


What is checkpoint? How to create checkpoints in our java projects?

1 Answers   ABC,


What are the different methods of identifying an object?

0 Answers  


What method is invoked to cause an object to begin executing as a separate thread?

0 Answers  


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

0 Answers  


How are the elements of a cardlayout organized?

0 Answers  


What is the relationship between an event-listener interface and an event-adapter class?

0 Answers  


Categories