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

What is serialization and de-serialization ?

5 Answers  


Difference between hashmap and hashtable?

0 Answers  


What is JNI?

1 Answers   Google, TCS,


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

0 Answers  


whats is mean by tiles in struts

2 Answers   SolutionNET,






What is an applet?

5 Answers  


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

0 Answers  


What is deadlock?

2 Answers  


Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


Where can I ask questions and make suggestions about seam?

0 Answers  


What state a thread enters, When it blocks on I/O?

2 Answers  


Can I use javascript to submit a form?

0 Answers  


Categories