What is the use of constructor in java? | Basic computer programming, Java programming tutorials, Java tutorial
Skip to content
Search for easy dinners, fashion, etc.
When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.
an image of a computer screen with text
1
vtechacademy.blogspot.com

Why we use constructor in java

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...
Prachi
Prachi

Comments

More about this Pin

Board containing this Pin

Selected board cover image
Java
303 Pins
1mo

Related interests

Javascript Math Functions Chart
Javascript Math Function Example
Sql Database Introduction Text
How To Learn Java Constructors
Sql Database Schema Example
How To Use Constructors In Java
Types Of Constructors In Java
Sql Configuration Parameters Interface
Java Constructor Explanation Diagram