How to send a request to garbage collector?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is the difference between the string and stringbuffer classes?
What is the relation between the infobus and rmi?
What are the methods used for inter-thread communication? and in what class these methods are defined?
Explain Life cycle of Servlet Filter.
2 Answers InfoBrain, ITC Infotech,
what is a dirty read?
What is the relationship between an event-listener interface and an event-adapter class?
Describe activation process?
What is MOM?
What is the purpose of the wait(), notify(), and notifyall() methods?
what are the software's needed to develop advanced java 3 tier application project
What is preemptive and Non-preemptive Time Scheduling?
int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!