Define Constructors in Java.

I am strating learn java but i have no idea how to learn.Please advice.please anwser this question.I am waiting your answer

1 Answer
Constructor in java is a special type of method that is used to initialize the object. Java constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object that is why it is known as constructor.

We use cookies to enhance your experience, to provide social media features and to analyse our traffic. By continuing to browse, you agree to our Privacy Policy.