Types of Methods in Interfaces
Duration: 13 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 explains the four commonly discussed types of methods in Java interfaces: abstract, default, static, and private. It begins with abstract methods, defined as declarations without a method body, demonstrated through an Animal interface with void sound() and a Dog class that implements it, producing the console output "Dog barks." The lesson then covers default methods, introduced in Java 8, which have a method body and are declared using the default keyword, such as default void eat() printing "Animal eats." Static methods are presented next; they belong to the interface itself, have a method body, and are called using the interface name rather than an object, as shown by Demo.display() printing "Hello." Private methods, introduced in Java 9, are shown with a method body and cannot be accessed directly outside the interface; the example uses private void message() called from a default method. The lecture then shifts to the advantages of interfaces, including abstraction, loose coupling, code reusability, and maintainability, illustrated with Animal and Vehicle interface examples. Finally, a comparison table contrasts abstract classes and interfaces across keywords, methods, variables, constructors, inheritance, and purpose. Side-by-side code examples both named Vehicle show that the abstract class example outputs "Car starts" and "Vehicle Stopped," while the interface example outputs only "Car starts," reinforcing the practical differences between the two constructs.
Chapters
0:00 – 2:00 00:00-02:00
The slide titled "Types of Methods in an Interface" states that Java supports four commonly discussed types of interface methods. Section A defines an abstract method as one declared without a method body, with the code line void sound(); highlighted in a red box. The Main.java editor shows interface Animal { void sound(); }, class Dog implements Animal with public void sound() printing "Dog barks", and a Main class calling d.sound();, with the Console tab displaying "Dog barks." Red hand-drawn circles highlight void sound();, the sound() body, and d.sound();, with an arrow pointing to the console output.
2:00 – 5:00 02:00-05:00
Section B introduces the default method, described as having a method body and being declared using the default keyword, with a note that it is introduced in Java 8. The code example shows default void eat() { System.out.println("Animal eats"); } and console output "Animal eats", with a comment noting that Dog can use the default method without overriding it. The lesson then transitions to static methods, which belong to the interface itself and have a method body. The Demo interface example includes static void display(), called as Demo.display(); using the interface name rather than an object, with console output showing "Animal eats" and "Hello." Red annotations emphasize the default and static keywords and the method calls.
5:00 – 10:00 05:00-10:00
Section D covers the private method, which has a method body and was introduced in Java 9. An Important note states it cannot be accessed directly outside the interface. The Main.java editor shows interface Demo containing private void message() printing "Hello", a default void display() calling message(), a Main class instantiating DemoImpl, and class DemoImpl implements Demo, with the console displaying "Hello". The instructor is visible in the lower-right corner gesturing throughout. The lesson then moves to a slide titled "Advantages of an Interface" with four quadrants: Abstraction, Loose Coupling, Code Reusability, and Maintainability, illustrated with interface Animal { void sound(); } and interface Vehicle { void start(); }. Red digital ink underlines and circles key terms and code snippets, and the section transitions to a comparison table titled "Difference between Abstract Class & Interface".
10:00 – 12:49 10:00-12:49
The comparison table contrasts abstract classes and interfaces across keywords, methods, variables, constructors, inheritance, and purpose. Red annotations highlight abstract and concrete methods in the abstract class column, and abstract, default, and static methods in the interface column. Circled annotations emphasize "only one" for inheritance versus "multiple interfaces", and "common state and behavior" for purpose. The final section shows side-by-side code panels both named Vehicle: the left "Example of Abstract Class" outputs "Car starts" and "Vehicle Stopped", while the right "Example of Interface" outputs only "Car starts". Red handwritten annotations include checkmarks, arrows, underlines, and a circle around c.start(); in the right panel.
The lecture follows a clear pedagogical sequence: it first defines each of the four interface method types with a concise textual definition followed by a runnable code example and console output, allowing students to connect syntax to behavior. Abstract methods establish the baseline contract, default methods show how interfaces can provide optional behavior since Java 8, static methods demonstrate interface-level utility methods called by interface name, and private methods illustrate Java 9 encapsulation within interfaces. The instructor consistently uses red annotations to draw attention to keywords and method calls, reinforcing the syntactic markers that distinguish each type. The second half of the lecture broadens the scope from method types to the strategic value of interfaces, listing abstraction, loose coupling, code reusability, and maintainability as advantages. The comparison table then consolidates the distinction between abstract classes and interfaces, and the final side-by-side Vehicle examples make the difference concrete: the abstract class can include a concrete stop() method producing "Vehicle Stopped", while the interface example produces only "Car starts", underscoring that interfaces define contracts without necessarily providing shared state or concrete behavior. This progression from syntax to rationale to comparative analysis supports exam preparation by covering definitions, examples, and conceptual distinctions.

