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 the use of java?
Can private method static?
Explain the difference between abstract classes and interfaces in java?
What is java lang string?
What is use of static in java?
What is a heavyweight component?
What is return null in java?
Why is inheritance used in java?
What purpose do the keywords final, finally, and finalize fulfill?
Does string isempty check for null?
What is a line break example?
What is string subsequence method?
When do we use synchronized blocks and advantages of using synchronized blocks?
Give me example of derived data types.
What is sizeof () operator?