constructor in java

Java Constructor

Java Constructor are special methods invoked when an object is created and are used to initialize them. A constructor can be used to provide initial values for object attributes. The constructor is called when you create an object using the new keyword. There are two types of constructors in Java: → default constructor→ parameterized constructor …

Java Constructor Read More »