Easy learning with example program codes

does constructor return any value in java?


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

Please follow and like us:

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki