There is no concept of destructor in JAVA. The concept of garbage collection deletes all the variables and functions of the program that’s execution is completed. So all the instance variables are automatically initialized with there zero values at the time of creation of the object, because the memory is cleared by the garbage collection concept. If user wants to delete an object from the memory then the finalize( ) function can be used to perform those type of operation. That means, using finalize () function, particular object can be deleted as the choice of the user but by the garbage collection all the objects are deleted after execution of the program which is performed automatically by the JVM. Java constructor and class