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
Can we create object of inner class in java?
What are the default and parameterized constructors?
Explain methods specific to list interface?
What is the main purpose of java?
what are abstract functions?
What is a "pure virtual" member function?
Say any two properties in beans?
How do you override a method in java?
How is string stored in java?
Can we force the garbage collection to run?
Is null in java?
What is the difference between array list and vector in java?
What is tochararray in java?
Difference between arraylist and hashset in java?
What is the difference between a synchronized method and a synchronized block?