Super classes ,sub classes, constructors in sub classes in OOP | EP=18 3rd SEM CS8392 | QT | tamil

Опубликовано: 22 Февраль 2026
на канале: Quick Through
805
21

OBJECT ORIENTED PROGRAMMING
UNIT II INHERITANCE AND INTERFACES
● 2.2 Super classes ,sub classes,constructors
in sub classes

“super” KEYWORD Usage of super keyword
● 1. super() invokes the constructor of the parent class.
● 2. super.variable_name refers to the variable in the parent
class.
● 3. super.method_name refers to the method of the parent class

“super” KEYWORD Usage of super keyword
● Super() will invoke the constructor of the parent class. Even
when you don’t add super()keyword the compiler will add one
and will invoke the Parent Class constructor.

“super” KEYWORD Usage of super keyword
● super.variable_name refers to the variable in the parent class
● When we have the same variable in both parent and subclass

“super” KEYWORD Usage of super keyword
● super.method_name refers to the method of the parent class
● When you override the Parent Class method in the Child Class
without super keywords support you will not be able to call the
Parent Class method.