Garbage Collector cleans up all unused or unreferenced objects. Any object that is no longer referred by any other object is eligible for cleanup and the garbage collection mechanism deletes these objects to make space for the program
If you define clean up in destructor garbage collector will take more time to clean up the objects and more and more objects are created in Gen 2..
i think it is imprtant because it is making our coumnity clean
I guess you want to talk about the garbage collector feature that Java has. The garbage collector is an automated program that the Java virtual machine would run once in a while. This program would clean up unused memory to ensure that there is enough memory available for the programs. you can invoke the garbage collector by calling the system.gc() method but this does not guarantee an invocation of the garbage collector. the JVM may or may not call the GC when we invoke it...
You usually do not need to delete a String, since when the program no longer refers to it, the garbage collector will clean it up.
In "The Giver," some euphemisms for "bathroom" could include "relief room" or "sanitation station." For "garbage collector," euphemisms might include "clean-up crew" or "waste management worker."
AMIT KUMAR3th Nov , 2014Java does not support destructors, since java supports the concept of garbage collection,hence the garbage collector is used to automatically free the space which has occupied by the program while running.Garbage collector calls the finalize() method which is defined in the object class. finalize() method is called once for each object.
throw garbage in the right place which is the garbage bin .
You can clean your car by yourself by cleaning out your garbage everyday. Keep a garbage bag in your car and throw the garbage in it as you get garbage. Then remove the bag everyday and throw it out and do the samething everyday.
by not throwing garbage in it
With a soft cloth and a gentle detergent, then dry them with a dry lint free, cloth or paper. Clean the solar collector panel, and wipe the dirt from the top of the panel. Look for bugs and tiny garbage, and remove these also. Use a damp cloth, and wipe gently.
not very clean and we the people are responsible for it but we can stil change it by throwing garbage in bins and using CNG in cars
there is none as long as the garbage can is clean (New) and you have ice to keep things cold if you need to