What is Constructor?

Constructor in Java is an uncommon kind of technique that is utilized to instate the object.

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

What is Normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...