filmov
tv
#44 Default vs Parameterized Constructor in Java
Показать описание
Check out our courses:
Coupon: TELUSKO10 (10% Discount)
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
For More Queries WhatsApp or Call on : +919008963671
In this lecture we will learn:
- Types of constructors in Java
- What are Parameterized constructors?
- What are default constructors?
A constructor in Java is a special method that is used to initialize objects.
Parameterized Constructor:-
- A constructor that takes some parameters is known as parameterized constructor.
- The parameterized constructor is used to provide different values to different objects.
Default Constructor:-
- A normal constructor is known as the default constructor.
- If you do not create any constructor, then java creates a default constructor. That constructor will be blank with no parameters.
- The default constructor is used to provide the default values to the object like 0, null, etc., depending on the type.
- The default constructor can change into the parameterized constructor. But Parameterized constructor can’t change into the default constructor.
More Learning :
Donation:
PayPal Id : navinreddy20
Coupon: TELUSKO10 (10% Discount)
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
For More Queries WhatsApp or Call on : +919008963671
In this lecture we will learn:
- Types of constructors in Java
- What are Parameterized constructors?
- What are default constructors?
A constructor in Java is a special method that is used to initialize objects.
Parameterized Constructor:-
- A constructor that takes some parameters is known as parameterized constructor.
- The parameterized constructor is used to provide different values to different objects.
Default Constructor:-
- A normal constructor is known as the default constructor.
- If you do not create any constructor, then java creates a default constructor. That constructor will be blank with no parameters.
- The default constructor is used to provide the default values to the object like 0, null, etc., depending on the type.
- The default constructor can change into the parameterized constructor. But Parameterized constructor can’t change into the default constructor.
More Learning :
Donation:
PayPal Id : navinreddy20
Комментарии