+ 1
Constructor
What is the main purpose of a constructor?
5 ответов
+ 8
Constructors are invoked to create objects from the class blueprint and also to initialize the instances of your class.
You may refer to the documentation:
https://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html
+ 2
when you want to intialize your data members in the object , then go for constructors.
0
💋💋
0
ههههه