Java constructor is conjured at the season of protest creation. It builds the values that gives information to an object that is the reason it is known as constructor. Here the one important point is constructor must have explixit no return type, it's name should be same as class name.
The following are the types of constructor.
- Default constructor
- Parameterized constructor
No comments:
Post a Comment