Interface in java | use of interface in java | is-a relationship java

Published: 03 May 2022
on channel: codeash
395
15

Interface in Java : An interface in Java is a blueprint of a class. It has static constants and abstract methods.
- The interface in Java is a mechanism to achieve abstraction.
- It is used to achieve abstraction and multiple inheritance in Java.
- It cannot have a method body.
- It cannot be instantiated just like the abstract class.
- Since Java 8, we can have default and static methods in an interface.
- Since Java 9, we can have private methods in an interface.

Java Interface also represents the IS-A relationship.

What is Is-A-Relationship : Is-A relationship in Java means different relations between two or more classes.
Use of Interface :
- It is used to achieve total abstraction.
- Since java does not support multiple inheritances in the case of class, by using an interface it can achieve multiple inheritances.
- It is also used to achieve loose coupling.

What is Loose coupling ?
Loose coupling in Java means that the classes are independent of each other.

🔰For Complete Core Java 👇👇👇👇👇👇
   • Java Tutorial in Hindi  

🔰 What is inheritance :
   • Single inheritance program in java | ...  
🔰 What is Upcasting :
   • what is upcasting | upcasting in java...  
🔔 Subscribe My Channel : @codeash
🔰 Follow my Social Media Platforms :
🏷Facebook :
  / codeash  
🏷Instagram :
  / codeash_learningguru  
🏷YouTube :
   / codeash  
🏷Telegram :
https://bit.ly/3MNQxYB

🌐 Website :
www.codeash.com
✅ Whatsapp Us
https://wa.link/r6n3p3

interface in java, use of interface in java, interface in oops, interface in oops java, interface in java in hindi, interface in hindi, is-a relationship java, loose coupling in java

#interface #interfaceinjava #useofinterfaceinjava #is-arelationshipjava #loosecouplinginjava


On this page of the site you can watch the video online Interface in java | use of interface in java | is-a relationship java with a duration of hours minute second in good quality, which was uploaded by the user codeash 03 May 2022, share the link with friends and acquaintances, this video has already been watched 395 times on youtube and it was liked by 15 viewers. Enjoy your viewing!