Interfaces in Java
Duration: 9 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Prelims: General Knowledge: Physics Chemistry Biology History Geography Polity Indian Economy Static General Knowledge GK- Current Affairs Environment
- Prelims: General English: Vocabulary Noun Pronoun Adjectives Preposition Articles Direct and Indirect Speech Tenses Conjunction Subject Verb Agreement (Verb Noun Agreement) Modals Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing) Sentence Correction (Error Correction) Sentence Completion (Fill in the blanks) Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions) Cloze Test (Cloze Passage) Verbal Analogy (Word Based Analogy) Sentence Construction Adverb Verb
- Prelims: Quantitative Aptitude: Percentage Ratio and Proportion (Ratios) HCF LCM Divisibility Rules Average Sequence and Series (Series) Number System Powers and Exponents (Surds and Indices) Algebra Profit and Loss Simple Interest and Compound Interest Time and Work Pipe and Cistern Speed Time and Distance Mixture and Alligation Mensuration and Geometry Age Problems Partnership Statistics Data Interpretation Arithmetic
- Prelims: General Agriculture: Agriculture in India and Tripura Natural Resource Management Fundamentals of Crop Production Horticulture Crop Improvement Crop Protection Social Science
- IT Mains: Operating System: Introduction to OS Process Management CPU Scheduling Process Synchronization Threads & Process Creation Deadlock Memory Management Virtual Memory Disc Scheduling File Management Distributed Systems
- IT Mains: Computer Networking: Introduction to CN DLL: Access Control DLL: Flow Control DLL: Error Control Data Link Layer - Ethernet Net Layer: IPv4 & Proto Net Layer: IP Addressing Net Layer:Routing Protocol Transport Layer Services TL: Congestion & UDP Application Layer Hardware Basics Network Security
- IT Mains: DBMS: Basics of DBMS ER Diagram Relational Model & Functional Dependencies Keys & Integrity Constraints Normalization (1NF - BCNF) Decomposition Properties & 4NF Relational Algebra SQL Relational Calculus Transaction Management Concurrency Control Database Recovery Big Data Systems Database Security & Authorization Enhanced Data Models NoSQL
- IT Mains: Software Engineering: Fundamentals of Software Engineering Software Requirements and Quality Assurance Software Design, Estimation and Metrics Software Testing Software Maintenance and Configuration Management
- IT Mains: Data Structures & Algorithms: Introduction to DS Array Stack Queue Linked List Tree Graphs Hashing Algorithm Analysis Time Complexity Analysis Sorting Algorithms
- IT Mains: OOPS with C++ & Java: C Fundamentals OOPS with C++ Java Fundamentals Array, String, IO & References OOPS with Java Generic & Collections Multithreading File Handling & I/O
- IT Mains: Python: Introduction to Python Tokens, Variables, Data Types, I/O Operators & Expressions Control Flow & Looping Collections & Strings Functions & Modules
- IT Mains: Website Development: Website, Browser & Services Internet Fundamentals Web Design & Development Protocols & Services Web Publishing & Hosting Server Side & Security Emerging Technologies HTML Basics HTML5 CSS JavaScript-Basics .Net Programming PHP
- IT Mains: Mobile App Development: Mobile Computing Multimedia
- IT Mains: Linux / Windows Server Admin: Unix OS Linux OS
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This lecture introduces Java interfaces as blueprints that define methods a class must implement, emphasizing that an interface specifies what to do, not how. The instructor presents the syntax `interface InterfaceName { void methodName(); }` and the example `interface Animal { void sound(); }`, then explains that a class uses the `implements` keyword, such as `class C implements I1, I2, I3`. A worked example in Main.java shows `interface Animal { void sound(); }`, `class Dog implements Animal` with a `sound()` method printing "Dog barks", and a `Main` class calling `d.sound()`. The lesson then covers important features: interfaces use the `interface` keyword, cannot be instantiated directly, do not have constructors, and a class must implement all abstract methods unless it is abstract. Variables in an interface are automatically `public static final`, as shown by `int VALUE = 100;` being equivalent to `public static final int VALUE = 100;`. Finally, the lecture introduces types of methods in an interface, beginning with abstract methods declared without a body, such as `void sound();`.
Chapters
0:00 – 2:00 00:00-02:00
The slide titled "Interface" defines an interface in Java as "a blueprint of a class" that defines methods a class must implement. The instructor underlines "blueprint of a class" and "methods that a class must implement," and notes that an interface tells a class what to do, but usually not how. The syntax block shows `interface InterfaceName { void methodName(); }` and the example `interface Animal { void sound(); }`. Under "How to Implement an Interface," the slide states a class uses the `implements` keyword, with red handwritten notes progressing from `class C extends P` to `class C implements I1, I2, I3`.
2:00 – 5:00 02:00-05:00
The instructor continues emphasizing the Animal example, circling "Different animals can implement this method in their own way" and underlining that "Animal is an interface and sound() is an abstract method." The lesson then moves to a code editor tab labeled "Main.java" showing `interface Animal { void sound(); }`, `class Dog implements Animal` with a `sound()` method printing "Dog barks", and a `Main` class calling `d.sound()`. Red annotations box `void sound();`, point to the Dog class, underline `Dog d = new Dog();` and `d.sound();`, and circle the console output "Dog barks". An "Explanation:" panel lists "Animal is an interface." and "Dog implements the Animal interface."
5:00 – 9:02 05:00-09:02
A slide headed "Important Features of an Interface" lists six numbered points, with red underlines on "interface keyword," "cannot be instantiated directly," and "does not have constructors." The instructor highlights that a class must implement all abstract methods unless the class is declared abstract. A "Variables in an Interface" section shows `interface Demo { int VALUE = 100; }` annotated as "Interface variable (public static final by default)," with an arrow to the equivalent `public static final int VALUE = 100;` and console output circled to show the constant accessed via the interface name. The final slide, "Types of Methods in an Interface," defines an abstract method as declared without a method body, using `void sound();` as the example.
The lecture builds a coherent progression from definition to implementation to rules. It starts by defining an interface as a blueprint that specifies what methods a class must implement, using the Animal/sound() example to illustrate abstraction. The implements keyword and multiple-interface syntax are introduced, then demonstrated in a runnable Main.java example where Dog implements Animal and prints "Dog barks." The features section clarifies constraints: no direct instantiation, no constructors, and mandatory implementation of abstract methods unless the class is abstract. Interface variables are shown to be implicitly public static final constants. The lesson ends by introducing method types, beginning with abstract methods declared without a body. This sequence supports exam revision by connecting syntax, a concrete example, and the governing rules.

