Lecture 6 Constructor In Java
#Constructors are special Member Method of the class.
It has same name as class name.
It is Declared In The Class but having no return type mentioned.
There are 3 Types of Constructor in Java.
#DefaultConstructor
#NoArgConstructor
#ParameterizedConstructor
It is used to Initialize your Object.
It is Invoked Implicitly When Object is created.
It can be declared private , public and protected.
We cant declare the constructors as static final.
Constructors never be Inherited but it can accessed by the child class using super keyword.
Question to be discussed in Next Lectures :
- What is Constructor Chaining & How it is Achieved ?
Видео Lecture 6 Constructor In Java автора Кодовое Сообщество
Видео Lecture 6 Constructor In Java автора Кодовое Сообщество
Информация
5 декабря 2023 г. 9:45:46
00:19:38
Похожие видео