MSK Institute • Shikohabad
Loading Page Content...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Connecting serverPlease wait...
💻 Practical Labs🚀 Free Demo📜 Verified Certificates
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Inheritance allows a new class (subclass / child) to acquire fields and methods from an existing class (superclass / parent) using the extends keyword. Java supports Single Inheritance of classes (a class can only directly extend one superclass).
super KeywordThe super keyword refers directly to the immediate parent class:
super(): Calls the parent constructor (must be the first line of the child constructor).super.member: Accesses parent variables shadowed by child variables.super.method(): Invokes parent method implementations from an overriding method.Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
Test your understanding of this lesson with 1 questions. Each question has one correct answer.