Polymorphism and its types in Java
Duration: 20 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- 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
- 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
- Paper 1 | General Knowledge: State Wise GK, History, Geography, GK- Current Affairs, Static General Knowledge, Polity, Indian Economy
- 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
- 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
- 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
- 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 polymorphism in Java, defining it as “one interface, many forms” and dividing it into compile-time (static) and run-time (dynamic) polymorphism. The instructor uses a flowchart to show that compile-time polymorphism is achieved through method overloading, while run-time polymorphism is achieved through method overriding. The first half focuses on method overloading, using a Calculator class example with overloaded add methods that differ by parameter count, type, and order. The console output “30 60 31.0” demonstrates how the compiler selects the correct method at compile time. The second half shifts to run-time polymorphism, also called dynamic polymorphism or late binding, and explains the rules for method overriding: same method name, same parameter list, and same or covariant return type. A code example with Animal and Dog classes shows that when a parent reference points to a child object, the child’s overridden method is executed at runtime, producing output such as “Dog barks.”
Chapters
0:00 – 2:00 00:00-02:00
The lecture opens with the title slide “OOPS with Java” and the subtitle “Polymorphism.” The instructor hand-annotates the word “Polymorphism” by underlining “many” and “form,” emphasizing the etymology of the term. The first content slide states that polymorphism means “one interface, many forms” and lists two types: “Compile-Time Polymorphism (Static Polymorphism)” and “Run-Time Polymorphism (Dynamic Polymorphism).” A flowchart appears with a top “Polymorphism” box splitting into a green “Compile-Time” box leading to “Method Overloading” and a pink “Run-Time” box leading to “Method Overriding.” Red marker cues, including a checkmark and circles around “Run-Time” and “Method Overriding,” accumulate as the instructor explains the two branches.
2:00 – 5:00 02:00-05:00
The slide continues with the definition “Polymorphism means ‘one interface, many forms’” and adds that “In Java, the same method call can produce different behavior depending on the situation.” The numbered list of the two polymorphism types remains visible. The flowchart is now color-coded: a blue “Polymorphism” box splits into a green “Compile-Time” box leading to a yellow “Method Overloading” box, and a pink “Run-Time” box leading to a purple “Method Overriding” box. In the top-right, the instructor hand-draws a red sketch of two boxes labeled “A” and “B” with “fun()” annotations, then adds the code “A a = new B();” and “a.fun();” with arrows linking them, illustrating how a parent-type reference can hold a child object and invoke an overridden method.
5:00 – 10:00 05:00-10:00
The lecture transitions to compile-time polymorphism. The slide titled “Compile time Polymorphism” highlights “Method Overloading” and “same name” with red circles. The instructor explains that method overloading means defining multiple methods with the same name but different parameter lists. A code panel shows a Calculator class with overloaded add methods and a Main class that calls them. Red arrows link each call in Main.java to the matching overloaded method in Calculator.java, demonstrating selection based on parameter number, type, and order. The console output “30 60 31.0” confirms the results of the three calls, and the slide notes “Static Binding” as the mechanism by which the compiler resolves the correct method at compile time.
10:00 – 15:00 10:00-15:00
The first part of this window continues the compile-time polymorphism example, with the Calculator.java / Main.java code panel and the console reading “30 60 31.0” still visible. Red arrows connect the overloaded add methods (int; int,int,int; double,double) to the matching calls in Main.java, reinforcing how the compiler chooses the method based on the argument list. The slide then switches to “Run time Polymorphism,” introducing bullets on method overriding, “Dynamic Polymorphism / Late Binding,” and a section headed “Important Rules for Method Overriding.” The instructor begins outlining the conditions that an overriding method must satisfy, setting up the detailed rules that follow.
15:00 – 19:40 15:00-19:40
The lecture explains run-time polymorphism, also called dynamic polymorphism or late binding, and introduces “Dynamic Method Dispatch / Dynamic Binding.” The slide lists the “Important Rules for Method Overriding”: the method name must be the same in both parent and child classes, the parameter list must be the same as that of the parent method, and the return type must be the same or covariant. The “@Override” annotation is mentioned as a way to signal intent. A code example shows a Dog class overriding a sound method from an Animal parent class. When the code is executed, the console displays “Dog barks,” demonstrating that the child class’s method is invoked at runtime even when called through a parent-type reference.
The lecture builds a clear two-part model of polymorphism. First, it establishes the definition and taxonomy: polymorphism is “one interface, many forms,” split into compile-time (static) and run-time (dynamic) forms. The flowchart consistently maps compile-time to method overloading and run-time to method overriding, giving students a visual anchor. The compile-time section uses a concrete Calculator example to show that overloading is resolved by the compiler based on the parameter list, producing static binding. The run-time section then contrasts this with dynamic binding, where the JVM selects the method at execution time based on the actual object type. The overriding rules—same name, same parameters, same or covariant return type—are presented as the contract that makes this safe. The Animal/Dog example with “Dog barks” output ties the abstract rules to observable behavior. For exam revision, students should remember the two types, their mechanisms (overloading vs. overriding), the binding type (static vs. dynamic/late), and the three overriding rules, using the Calculator and Animal/Dog examples as evidence of how each mechanism behaves.

