Java Tutorial - 28 Constructor in Java - StudyViral December 17, 2017 Java Tutorials No comments Java Tutorial - 28 Constructor in Java - StudyViral Constructors In Java Constructors are special methods which has the same name as class name. It also helps to initialize the object of a class. The new operator is used with constructor. If we don't specify constructor than java compiler automatically provide it, we can also say Constructor is implicitly called by Java Compiler. Constructor don't have return type. There are two type of constructors in java. 1). Default constructor. 2). Parameterized Constructor. Share This: Facebook Twitter Google+ Stumble Digg Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment