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 do you mean by Socket Programming?

0 Answers  


Is 'synchronised' a modifier?

2 Answers   NIIT,


what about static?

1 Answers  


What are the different approaches to represent an inheritance hierarchy?

0 Answers  


Where can I ask questions and make suggestions about seam?

0 Answers  






What is RPC?

2 Answers  


diff between jsp include directive and jsp action include?

2 Answers   SolutionNET,


What is the need of serialize?

2 Answers   Wipro,


What is prototype?

0 Answers  


diff mvc1 and mvc2 wahts is mean by servlet chaining?

3 Answers   SolutionNET,


Why are my checkboxes not being set from on to off?

0 Answers  


difference. between List and Set?

2 Answers   Campus Interaction, HCL, Infotech,


Categories