CodesJava

Easy learning with example program codes

does constructor return any value in java?


Constructor

Constructor is a special member of a class which is used to initialize the state of an object. It provides the values to the data members at the time of object creation that is why it is known as constructor.

Constructor does not have an explicit return type but it returns current instance.

Java interview questions on main method

Sign Up/ Sign In
Ask a Question


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki