filmov
tv
6. Java Constructor|| Default Constructor and Constructor with no argument.
Показать описание
What is deference between default Constructor and Constructor with no argument.
Types of Constructor
In Java, constructors can be divided into 3 types:
1) No-Arg Constructor
2) Parameterized Constructor
3) Default Constructor
3) Default Constructor
A constructor is called "Default Constructor" when it doesn't have any parameter.
The default constructor is used to provide the default values to the object like 0, null, etc.,
1) No-argument constructor:
No-argument constructor: A constructor that has no parameter is known as the default constructor.
object oriented programming
Java basic tutorial
Mobile number: 0093783654067
Types of Constructor
In Java, constructors can be divided into 3 types:
1) No-Arg Constructor
2) Parameterized Constructor
3) Default Constructor
3) Default Constructor
A constructor is called "Default Constructor" when it doesn't have any parameter.
The default constructor is used to provide the default values to the object like 0, null, etc.,
1) No-argument constructor:
No-argument constructor: A constructor that has no parameter is known as the default constructor.
object oriented programming
Java basic tutorial
Mobile number: 0093783654067