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
Are arrays dynamic in java?
Why pass by reference is not possible in java?
what is a green thread? : Java thread
What language is an assembler written in?
Which is a valid identifier?
Write a program to print count of empty strings in java 8?
If try block is successfully executed, Then Is Finally block executed?
What will be the default values of all the elements of an array defined as an instance variable?
Explain the importance of join() method in thread class?
Can we create a class inside a class in java?
What are the differences between graph and tree?
Is 0 true or false in java?
What is the functionability stubs and skeletons?
What access modifiers can be used for class ?
Why we use set in java?