What is garbage collection in Java, and how can it be used ?
Answer Posted / ms
garbage collecton in java means, if a particular object in
a program is not being refered since long time then it will
be automatically deleted with the help of garbage collector
so that some amount of memory is saved.we can explicitily
call it by adding a method system.gc()in the program.so in
this case there is no need to use'destructor'to destroy the
objects.
| Is This Answer Correct ? | 70 Yes | 17 No |
Post New Answer View All Answers
When the constructor of a class is invoked?
Who is the owner of java?
Can we call thread start () twice?
What is difference between calling start() and run() method of thread?
Does a function need a return?
What are nested classes in java?
Can we write any code after throw statement?
Is java a super set of javascript?
What is the final class?
What is the difference between compile-time polymorphism and runtime polymorphism?
Is hashset sorted in java?
How do you reverse a word in java?
What is meant by vector class, dictionary class, hash table class, and property class?
What is the unit of plancks constant?
What is the difference between procedural and object-oriented programs?