What is garbage collection in Java, and how can it be used ?
Answer Posted / syed sikandar bakht
when an object in memory is no longer refered by a variable,
the garbage collector automatically move it to garbage
collection.
instead of calling destructor JVM do it automatically, as we
use destructor in c++ to destroy the object.
Is This Answer Correct ? | 20 Yes | 6 No |
Post New Answer View All Answers
When should I use a singleton?
What is bifunction in java?
What is the longest unicode character?
what is meant by Garbage collection?
What are the restrictions imposed on method overriding?
What is difference between iterator access and index access?
What do you understand by Header linked List?
State the difference between creating string as new () and literal.
What are strings in physics?
What is the difference between a synchronized method and a synchronized block?
What is the properties class?
Is arraylist a class in java?
Is special character in java?
Can we override static methods in java?
What are the four corner stones of oop?