View Single Post
Old 04-11-2018, 09:15 PM   #1
Jessicca
Registered User
 
Join Date: Apr 2018
Posts: 2
What is constructor and destructor in java?

In Java, constructors are like methods and each object is created by calling a constructor of the class with the new keyword. Some important features of a constructor are: A Constructor must have the same name as the class, They have no return type not even void. A Constructor can be public, private, protected. In Java, there is no destructor. But, Java provides a feature named Garbage collection and it’s an effective way for memory management instead of a destructor. Continue here to get one of the best site providing online dissertation services.
Jessicca is offline   Reply With Quote