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

Опубликовано: 03 Май 2022
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн Interface in java | use of interface in java | is-a relationship java длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь codeash 03 Май 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 395 раз и оно понравилось 15 зрителям. Приятного просмотра!