What do you mean by Constructor?
Question : What do you mean by Constructor?
Constructor gets invoked when a new object is created. Every class has a constructor. If we do not explicitly write a constructor for a class the java compiler builds a default constructor for that class.