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
What is the significance of continue jump statement? Explain with an example.
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
What are the types of java languages?
Write a program based on Java script program.
How many types of operators are there?
Define interface in java?
Is a class subclass of itself?
What is command line argument in java?
Explain about main() method in java ?
What are the 5 types of research methods?
Can sleep() method causes another thread to sleep?
What is the maximum size of a string in java?
What is function and method in java?
What is difference between java and java ee?
Is break statement can be used as labels in java?