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
What will happen if a thrown exception is not handled?
What classes of exceptions may be thrown by a throw statement?
How to perform linear search in java?
When should you use arraylist and when should you use linkedlist?
What happens when you add a double value to a string?
Difference between arraylist and vector.
What is comparable and comparator interface? List their differences
Explain jdk, jre and jvm?
What is null mean in java?
Why does abstract class have constructor?
What are the features in java?
What is the applet security manager, and what does it provide?
Explain the access modifiers for a class, method and variables?
What is garbage collection? What is the process that is responsible for doing that in java?
What is the public field modifier?