Answer Posted / niraj talukdar
Garbage Collection is an automated process in Java unlike C
and C++. It executes to wipe out those objects which no
longer are used in a program or stay idle for a very long
time. This to free memory space alloted to these
objects.However, it is not guaranteed that all the idle
objects wil be destroyed every time garbage collection
process gets executed.A user can also manually call the
garbage collection to take place by executing System.gc()
method.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How does a cookie work in Servlets?
What is the differences between c++ and java? Explain
What exactly is a .class file?
What are the advantages of functions?
What is variable and its types?
Is minecraft 1.15 out?
Explain constructors and types of constructors in java.
Why is it called a string?
Where and how can you use a private constructor?
If two threads have same priority which thread will be executed first ?
What are benefits of java?
What is floating data type?
Can we define constructor in inner class?
Explain restrictions on using enum?
What is main in java?