Destructor and Finalize
Destructor and Finalize
Introduction to DESTRUCTOR
when we create an object of the class it occupies some space in the memory (heap). If we do
not delete these objects, it remains in the memory and occupies unnecessary space that is not
upright from the aspect of programming. To resolve this problem, we use the destructor
Output:
NAMING
CONVENTION
Introduction to DESTRUCTOR
● Java naming convention is a rule to follow as you decide what to name your identifiers such as class,
package, variable, constant, method, etc.
● But, it is not forced to follow. So, it is known as convention not rule. These conventions are suggested by
several Java communities such as Sun Microsystems and Netscape.
Method camelCase Method should be named using main(), print(), println() etc.
camelCasing. Method names should
always start with a lower case letter.
Package snake_case (all lower case) Packages should be named using java, lang, util
snake_casing. Package names should
always start with a lower case letter.