Java constructors are the methods which are used to initialize objects. Constructor has the same name as that of class, they are called or invoked when an object of class is created and can't be called explicitly.
Example of Constructor:public class A
{
public A() // constructor method
{
}
}
Types of Constructor 1. Default Constructor.
2. Parameterized Constructor.
1. Default Constructor.If...
Constructor in java
01:50
Posted by
Unknown
constructor
,
constructor chaining
,
constructor overloading
,
default constructor
,
parameterized constructor
No comments