1.

Why We Use Garbage Collection In Java ?

Answer»
  • Whenever we create an object, it OCCUPIES some space in memory. And once it completes its task, we need to delete this object to free the memory, so that it can be used by another object. For this purpose, we have used GARBAGE collection in JAVA.
  • Garbage collection in Java is a process which is used for AUTOMATIC memory management.
  • It destroys or deletes the unused objects from the heap area of the memory.
  • We do not use any explicit method or function in Java for garbage collection as it is AUTOMATICALLY performed by JVM.



Discussion

No Comment Found