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
Does A Class Inherit The Constructors Of Its Superclass?
Why do we use return statement?
Can we create our own daemon thread?
What is extension method in java?
What is initial size of arraylist in java?
How infinite loop is declared?
Say any two properties in beans?
What is the difference between scrollbar and scrollpane?
What is a war file?
When do we use synchronized blocks and advantages of using synchronized blocks?
Why to use nested classes in java?
Can a class declared as private be accessed outside it’s package?
What lambda means?
What is charat ()?
Which is faster call by value or call by reference?