What is garbage collection in Java, and how can it be used ?
Answer Posted / jitendra
An application running on a system computer uses some
memory, which makes memory management a significant issue
for any programming language. As Java is comparatively high-
level language, the memory management in Java is automatic.
To make it more efficient, we need to understand garbage
collection, i.e. freeing memory from objects that are no
longer in use.
Garbage collection is the process of automatically freeing
objects that are no longer referenced by the program. This
frees a programmer from having to keep track of when to
free allocated memory, thus preventing many potential bugs
and problems.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are accessor methods in java?
Is java an ide?
what is meant wrapper classes?
Can anonymous class have constructor?
What are the topics in advance java?
When would you use a static class?
What are the advantages of packages in java?
Can there be an abstract method without an abstract class?
What is a stringbuilder?
What is maximum size of arraylist in java?
What is void data type?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Differentiate between stringbuffer and stringbuilder in java.
Should database connections be singleton?
What is instance example?