Why we can not force Garbage Collection?

Answer Posted / pradeep panwar

Hi All....
yea thats true that we can't force for Garbage Collection.
We can send a request by system.gc(); at any time but its
not sure that garbage collection takes place at that time.
It depends on memory. So we cant forcr fot GC either
sending the explicit request.

can catch me on +91-9899954354

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What defines function?

529


What is jdbc api?

527


Is string passed by reference in java?

541


What is stored procedure. How do you create stored procedure ?

1482


What is final keyword in java?

547






If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

694


what is collatration?

2735


What is meant by class loader? How many types are there? When will we use them?

497


What is a Hash Table? What are the advantages of using a hash table?

599


define the terminology association.

607


How many inner classes can a class have?

565


What is difference between arraylist and list in java?

572


What is the base class of all exception classes?

575


What’s a deadlock?

602


Is java jre still free?

518