What is a Constructor 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.
Constructors are special methods that are used to initialize an object’s state. An appropriate constructor for the class is invoked whenever a new object is created in a program, using the new keyword. The constructor’s name must resemble the class name. There must be no explicit return type in the constructor.