How many types of constructors are used in Java?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Please Disable the AdBlocker to Continue to the site.
There are two sorts of constructors in Java, depending on the parameters that are delivered in the constructors.
Default Constructor: A constructor that does not accept any values is known as the Default Constructor. Instance variables are typically initialised with default values using the Default Constructor. It can also be utilised to carry out various beneficial tasks related to object creation. If no constructor is defined in the class, the compiler implicitly invokes the Default Constructor.
Parameterized Constructor: A Parameterized Constructor is a constructor that is able to initialise instance variables with the given values. In other words, we can say that parameterized constructors are constructors that can accept arguments.