What is garbage collection in Java, and how can it be used ?
Answer Posted / rana.ankur
Garbage collection is a method of jvm.In JAVA when object
iis not use in otherway there is no refrence to that object
it is ellegible for Garbage collection.
demon thread is used and its is known as Garbage
collectior..
and finalize method are also invoke to give last chance to
object to save it imprtant data..thanking you
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
If we don’t want some of the fields not to serialize how to do that?
What is a protected method?
What is the default access specifier for variables and methods of a class?
Difference between method overloading and method overriding in java ?
Explain the difference between arraylist and linkedlist in java?
What is lexicographically smallest string?
What is t type java?
How do you clear a method in java?
Explain access modifiers in java.
Is null a keyword in java?
Can we call the constructor of a class more than once for an object?
How can we find the sum of two linked lists using stack in java?
how to create multithreaded program? Explain different ways of using thread? : Java thread
Can we extend singleton class?
What is string english?