What is garbage collection in Java, and how can it be used ?
Answer Posted / ms
garbage collecton in java means, if a particular object in
a program is not being refered since long time then it will
be automatically deleted with the help of garbage collector
so that some amount of memory is saved.we can explicitily
call it by adding a method system.gc()in the program.so in
this case there is no need to use'destructor'to destroy the
objects.
Is This Answer Correct ? | 69 Yes | 17 No |
Post New Answer View All Answers
What is a method in java?
Is null a string or object in java?
Is zero a positive integer?
What methods are used to get and set the text label displayed by a button object?
What is the difference between static and non-static variables in java programming?
Explain java thread life cycle.
How to access arraylist elements in java?
What is the difference between size and length in java?
Why does my function print none?
Is there a jre for java 11?
Why is stringbuffer not immutable?
Why java is considered as platform independent?
How do you delete a list in java?
What is the difference between the ">>" and " >>>" operators in java?
What is r * in math?