+1 vote
in JAVA by

what do you mean by Constructor?

The points given below explain what a Constructor is in detail:

  • When a new object is created in a program a constructor gets invoked corresponding to the class.
  • The constructor is a method which has the same name as class name.
  • If a user doesn’t create a constructor implicitly a default constructor will be created.
  • The constructor can be overloaded.
  • If the user created a constructor with a parameter then he should create another constructor explicitly without a parameter

Related questions

+1 vote
asked May 24, 2019 in JAVA by rajeshsharma
+1 vote
asked May 24, 2019 in JAVA by rajeshsharma
...