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 a convertor?

1 Answers   Suzlon,


what are design patterns in java?give with example?

2 Answers   HCL, iGate,


the use of try and ffinally keyword

1 Answers  


how the mapping can be done from jsp to actionservlet?

2 Answers   SolutionNET,


What are the steps to write p-to-p model application?

0 Answers  






What is Bootstrapping in RMI?

1 Answers  


Can I run seam with jdk 1.4 and earlier?

0 Answers  


What is multithread synchronizing ?

4 Answers   Sun Microsystems,


important features of java which differenciate it from c++

3 Answers  


What is table mutation and how do you avoid it?

0 Answers  


Explain ioc concept?

0 Answers  


Explain the steps in details to load the server object dynamically?

0 Answers  


Categories