INTERFACE IN JAVA in Hindi Lecture 79
//Interface in Java 1.An interface is a non-primitive data type i.e reference data type(It means it is a blueprint of abstract and cannot create object of interface).It is similar to class.It includes public , static and final keyword before variables or data members (the value that cannot be changed or constant value) and public abstract method before interface method . 2.The interface is a mechanism to achieve abstraction.The interface includes abstract method. We declare abstract method and give implementation in child class. 3.It is used to achieve abstraction and multiple inheritance in Java.The multiple inheritance uses keyword implements to inherit abstract method in child class in interface where as extends keyword is used in abstract class. 4.We cannot create object of interface just like abstract class. 5.We give implementation of abstract method of interface in its child class. 6.If we donot give implementation of abstract method of interface in its child class then that child class also becomes abstract class. Syntax---- interface example { //All the variables are public static final of interface //It is similar to float pi=3.14F; public static final float pi=3.14F; //All the methods are abstract method of interface //It is also similar to void display(); public abstract void display(); } //Why we use Interface 1.It is used to achieve abstraction. //Abstraction in Java Abstraction is the process of hiding implementation details(hiding internal details) and showing only essential features.Abstraction allows you to focus on what an object does rather than how it does it. Example----A driver only knows to drive the car and he does not know how the car engine has been manufactured. There are three ways to achieve abstraction in Java------ 1.Using Abstract Class 2.Using Abstract Method 3.Using Interface 2.By Interface we can support the functionality of multiple inheritance. //Internal addition by compiler The java compiler adds public and abstract keywords before the interface method.More, it adds public , static and final keywords before data members. //Interface in Java //w.a.p for use of interface interface examp { public abstract void show(); } class test implements examp { public void show() { System.out.println("welcome to hello"); } } class example { public static void main(String args[]) { test obj=new test(); obj.show(); } }

ABSTRACT METHOD IN JAVA in Hindi Lecture 78

What is CI/CD Pipeline? | Simply Explained by Shradha Ma'am

NERVOUS 12-Year-Old Who Can Sing Without Opening Her Mouth Earns Mel B's GOLDEN BUZZER!

Sunil Grover's EPIC Siddhu Paaji Mimicry 😂 Ft. Yuvraj Singh, Sehwag | #TGIKS | Netflix India

EXAMPLE OF INTERFACE IN JAVA in Hindi Lecture 82

Introduction to Java and Java features in Hindi(Lecture-1)

SELECTION SORTING IN JAVA in Hindi Lecture 110

ADHD Child vs. Non-ADHD Child Interview

Sunil Grover’s HILARIOUS Aamir Khan Mimicry 🤣🚨 Ft. Kartik Aaryan | TGIKS | Netflix India

Kapil Dev 175* – The Truth That Was Hidden From Us I Cricket Knockout

Rowan Atkinson's Brilliant Humor Leaves Celebrities in Tears!

70th Filmfare Awards 2025| Full Episode | SRK, Akshay Kumar, Jaya Bachan & more

Jaishankar’s Ice-Cold Reply Leaves Arrogant American Speechless

Aarushi Murder Case Reality: Forensic Expert Dr TD Dogra ने बताया आरुषि को किसने मारा?

MISSION 73 (2026) Full Action Movie | Akshay Kumar | John Abraham | New Bollywood Superhit Movies

Microsoft Intentionally Destroyed Better Version of Windows Before Anyone Could Use It: DR-DOS Story

'Discussing Paper Leak Is A Crime?': Sanjay Singh Stopped By UP Officials While Exposing Paper Leak

SQL - Complete Course in 3 Hours | SQL One Shot using MySQL

Myths About India: An Indian Explains India | Stereotypes, Food, Cows, Castes, and English

