answersLogoWhite

0

What is a java deconstruct?

Updated: 12/7/2022
User Avatar

Wiki User

12y ago

Best Answer

Every class has at least one it's ownconstructort. Constructor creates a instance for the class. Constructor initiates (initialize) something related to the class's methods. Constructor is the method which name is same to the class. But there are many difference between the method (function) and the Constructor.

In this example we will see that how to to implement the constructor feature in a class. This program is using two classes. First class is another and second is the main class which name is Construct. In theConstruct class two objects (a and b) are created by using the overloaded another Constructor by passing different arguments and calculated the are of the different rectangle by passing different values for the another constructor.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Learn bay

Lvl 8
1y ago

What is the destructor in Java? It is a special method that automatically gets called when an object is no longer used. When an object completes its life-cycle the garbage collector deletes that object and deallocates or releases the memory occupied by the object.

To learn more about data science please visit- Learnbay.co

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a java deconstruct?
Write your answer...
Submit
Still have questions?
magnify glass
imp