What is garbage collection in Java, and how can it be used ?
Answer Posted / devarathnam c,kotagudibanda(po
Hi...
GarbageCollector: Whenever an object is no longer used in
the program at that time the garbage collector reclaims the
memory of an object.It is controlled by the JVM ,The JVM
runs periadically by using "mark" and "sweep"algorithms.
Instead of "destructor" in c++ , java supports garbage
collector.
| Is This Answer Correct ? | 84 Yes | 21 No |
Post New Answer View All Answers
Is the empty set a singleton?
How does compareto work in java?
Can constructor be static or final?
What are recursive functions?
If try block is successfully executed, Then Is Finally block executed?
What are the different types of java?
What is constructor and virtual function? Can we call a virtual function in a constructor?
What is jar?
How can you read an integer value from the keyword when the application is runtime in java? example?
What is meant by bytecode?
How can you set an applet’s height and width as a percentage?
Which java version is latest?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.
Tell me about different OOPS concepts.
What is array size in java?