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 a variable be local and static at the same time?
Explain java coding standards for constants?
How do you add an element to a hashset in java?
Can private method static?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
What is a private class in java?
What is another word for methodology?
Java is Pass by Value or Pass by Reference?
What comes to mind when someone mentions a shallow copy in java?
What are the main differences between notify and notifyAll in Java?
What do you mean by static variable?
What is indexof in java?
Write a program to find the whether a number is an Armstrong number or not?
What are the high-level thread states in java programming?
What is immutable in java?