1. How can you force garbage collection? [a] Garbage collection cannot be forced [b] Call System.gc(). [c] Call Runtime.gc(). [d] Set all references to null. Answer 1 [a] Garbage collection cannot be forced i think garbage collection canbe forced by calling System.gc()or Runtime.gc(). m I wrong?
no it cannot be forced you can just tell the gc you would like it to run but nothing is guaranteed... Try to search the forum for "force garbage collection" you'll find some good discussion about the subject... HIH ------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
One can request to Sir Garabage Collection could you please run, rather then forcing, Mr.Garabage Collection Run Now! What do u think Valentin?. Bye. Viki.
------------------ Count the flowers of ur garden,NOT the leafs which falls away!
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
Just have done an overview of the article.It seems me good. Thanx. Bye. Viki. ------------------ Count the flowers of ur garden,NOT the leafs which falls away!
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)