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
What is the difference between the final method and abstract method?
Can we print null in java?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
Is empty set an element of empty set?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
What is += mean in java?
Which list is sorted in java?
How do constructors use this() and super()?
What is a Transient Object?
How to sort double array in java?
What is unmodifiable list in java?
What is the use of static methods?
What are the types of methods in java?
How do you write a conditional statement?
Why is java so popular?