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
Can you explain the cs option of java interpreter?
What is the arraylist in java?
What will be the initial value of an object reference which is defined as an instance variable?
Why main method is static in java?
What types of index data structures can you have in java?
is there a separate stack for each thread in java? : Java thread
How do you create a reference in java?
What is hash in java?
What is the synonym of string?
What is bom encoding?
How many types of keywords are there?
How will you print number in reverse (descending) order in BST.
Why chararray() is preferred over string to store the password?
What is the final keyword denotes?
What does snprintf return?