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

Publicado em: 03 Maio 2022
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line Interface in java | use of interface in java | is-a relationship java duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário codeash 03 Maio 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 395 vezes e gostou 15 espectadores. Boa visualização!