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

How database connectivity in XML is achieved?

0 Answers  


What is the difference between java class and bean?

0 Answers  


What if the static modifier is removed from the signature of the main method?

0 Answers  


Define prototype?

0 Answers  


what are JSP tags? what is difference between include action and directory?

0 Answers   ADP,






What is the diffrence between a local-tx-datasource and a xa-datasource?

0 Answers  


What is a layout manager?

2 Answers  


can any one tell me how to learn good coding techniques

3 Answers  


What is Connection Pooling?

1 Answers   Enteg Technologies, Infosys, Polaris,


Which container method is used to cause a container to be laid out and redisplayed?

0 Answers  


What are the oops concept?

0 Answers  


Can I have an action without a form?

0 Answers  


Categories