destructor


Does Java Support Destructor? In Java, we don’t have specific destructors. Java already contains a garbage collector which runs automatically on JVM. Whenever we run a program garbage collector will always check the unwanted objects and deallocates the memory used by them. What Problem Does Garbage Collector Cause?