What is garbage collection in Java, and how can it be used ?
Answer Posted / rintu kumar kanp
Finding garbage and reclaiming memory allocated to it.
Garbage holds unreferenced objects
ex:-
Student ali= new Student();
Student khalid= new Student();
ali=khalid;
Now ali Object becomes a garbage,
It is unreferenced Object
it be used When the total memory allocated to a Java
program exceeds some threshold.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which class is used by server applications to obtain a port and listen for client requests?
How to find the given number is a prime number or not by getting input from the user
what is the purpose of the runtime class?
Difference between final and effectively final ?
What is finally and finalize in java?
What is the replace tool?
What is difference between path and classpath in java?
How do you create a null object?
What is a memory leak in java?
What is the base class of all exception classes in java?
What is collection class in java?
What is the console in java?
Why doesn't the java library use a randomized version of quicksort?
How java is similar to c?
What is a wrapper method?