Answer Posted / mohit
Hi Friends.. System.gc()does not forcefully to gc.it request
only.it has only 10% chance to run gc.but if u use
thread.sleep(1000);it has chance 50% to run gc.but if u use
for(i=1;i<=1000;i++)
{
System.gc();
}
so it has 99% chance to run gc.because gc release the memory
only when heap is full otherwise JVM is very lasy.....
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Where we write javascript code in html page?
How many types of literals are there in JAVA?
How do you sort data in java?
Say any two properties in beans?
What is string [] java?
What are strings in physics?
Can a class have 2 constructors?
What is a local class in java?
What is java reflection?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What is singleton service?
What is data structure in java?
Is sizeof a preprocessor?
What is a finally block?
What does pointer mean?