Super Keyword in Java

Duration: 9 min

This video lesson is available to enrolled students.

Return to /learn/RPSC-PROGRAMMER/paper-2-programming-language-java/oops-with-java/inheritance/asset-super-keyword-in-java after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. Paper 1 | Reasoning Test: Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Syllogisms, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Seating Arrangements, Blood Relations, Puzzle Solving (Puzzles), Venn Diagram, Analogy, Ranking, Order and Sequence, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Selection Decision Table (Decision Making), Logical Sequence Of Words, Cubes & Dices, Analytical Reasoning (Counting Figures Reasoning), Calendar, Alphabet and Word Tests, Numerical Reasoning, Number System, Averages, Mixtures and Alligation, Percentages, Series Completion, Analogy and Classification, Patterns in Two-Dimensional Figures, Coding and Decoding, Mathematical Operations, Direction Sense, Algebra, Logical Deduction and Induction, Syllogisms and Venn Diagrams, Critical Reasoning, Order, Ranking and Sequence, Reading Comprehension, Profit, Loss and Discount, Constraint Puzzles, Speed, Time and Distance, Traverse Surveying, Ratio and Proportion, Time and Work, Mensuration, Permutations and Combinations, Clocks and Calendars, Data Interpretation, Assembling and Grouping of Shapes, Transformation of Shapes, Three-Dimensional Patterns and Visualization, Cubes and Dice, Vocabulary, Blood Relations, Data Sufficiency
  2. Paper 1 | Numerical Analysis: Number System, HCF LCM, Percentage, Ratio and Proportion (Ratios), Average, Sequence and Series (Series), Powers and Exponents (Surds and Indices), Algebra, Statistics, Data Interpretation, Mental Ability, Arithmetic, Logarithm, Profit and Loss, Simple Interest and Compound Interest, Speed Time and Distance, Mixture and Alligation, Mensuration and Geometry, Permutation and Combination, Probability, Sequences and Series, Powers, Surds and Logarithms, Subject-Verb Agreement, Sentence Completion, Geometry, Sentence Structure and Correction, Data Sufficiency, Trigonometry, Measurement and Quantity Take-Off, Signal Space and Optimum Detection, Probability, Statistics, Algebra, Time and Work, Speed, Time and Distance, Data Interpretation, Graph Theory, Combinatorics
  3. Paper 1 | General Knowledge: State Wise GK, History, Geography, GK- Current Affairs, Static General Knowledge, Polity, Indian Economy
  4. Paper 1 | DBMS: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, SQL, Transaction Management, Concurrency Control, Relational Calculus, Database Security & Authorization, Database Recovery
  5. Paper 1 | Data Communication & Network: Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Network Security, Security in Mobile and Wireless Computing, Input Output Organisation, File Management, Hardware Basics, Terms & Abbreviations, Protocols & Services, Network Access Technologies, Cyber Safety and Security, Basics of COA
  6. Paper 2 | System Analysis & Design: Fundamentals of Systems and Information Systems, SDLC and Development Approaches, Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Documentation and Software Requirements Specification (SRS), SDD and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management, Security, Risk Management & Maintenance, extras
  7. Paper 2 | Programming Language (Java): Java Fundamentals, OOPS with Java, Array, String, IO & References, Generic & Collections, Multithreading, Java, Miscellaneous, Control Flow, OOPS with C++, Stack, C Fundamentals, Arrays & Pointers, Object Oriented Technology, Control Flow & Looping, Introduction to Python
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture introduces the Java super keyword, defining it as a reference to the immediate parent class. The instructor presents three main uses: accessing parent class variables, calling parent class methods, and calling parent class constructors. A hand-drawn diagram shows a child class B extending parent class A, with arrows labeled this and super to distinguish the current object from the parent reference. The first code example defines Parent with int x = 10 and Child extends Parent with int x = 20. Child's show() method prints x and super.x, producing console output 20 then 10, demonstrating that x refers to the child's field while super.x accesses the parent's field. The second example demonstrates calling a parent method: Parent's show() prints Parent, while Child's show() prints Child and then calls super.show(), producing output Child then Parent. The final example covers constructor chaining: Parent's constructor prints Parent Constructor, and Child's constructor begins with super() before printing Child Constructor, producing output Parent Constructor then Child Constructor. A note emphasizes that super() must be the first statement inside a constructor.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The slide titled Super Keyword states that the super keyword refers to the immediate parent class and lists three uses: access parent class variables, call parent class methods, and call parent class constructor. The Main.java editor shows class Parent with int x = 10 and class Child extends Parent with int x = 20. Child's show() method prints x and super.x, with comments indicating 20 is the Child's x and 10 is the Parent's x. The console displays output lines 20 and 10, confirming that super.x resolves to the parent's field when both classes define the same variable name.

  2. 2:00 – 5:00 02:00-05:00

    The instructor reinforces the definition by circling the phrase immediate parent class in red and drawing a diagram with box B pointing up to box A, using arrows labeled this and super to show the relationship between the current object and its parent. The same Parent and Child code example remains visible, with red annotations pointing to the super.x line and the Parent class field. The numbered list of three uses is underlined in red, emphasizing that variable access is the first application of super before moving to method and constructor calls.

  3. 5:00 – 9:18 05:00-09:18

    The lecture transitions to the second use, calling parent methods. A screen titled Call Parent Method shows Parent's show() printing Parent and Child's show() printing Child then calling super.show(), with console output Child followed by Parent. The final screen, titled Call Parent Constructor, shows Parent's constructor printing Parent Constructor and Child's constructor beginning with super() before printing Child Constructor. The console displays Parent Constructor then Child Constructor, and a footer note states that super() must be the first statement inside a constructor, establishing the required order for constructor chaining.

The lecture progresses systematically through the three uses of the super keyword in Java inheritance. It begins with the core definition and a variable-access example where field hiding occurs because both Parent and Child declare int x. The this versus super distinction is clarified visually with a box diagram. The method example shows how super.show() invokes the parent's overridden method after the child's own code executes. The constructor example demonstrates mandatory chaining, where super() must appear first in the child constructor so the parent constructor runs before child initialization. Together, these examples establish that super provides explicit access to the immediate parent's members when they are hidden or overridden.

Loading lesson…