filmov
tv
Java Tutorials: Interfaces in Java | Implementation | When to use Interface
Показать описание
Interface:
When to use Interface:
- If there's classes, which'll implement functionality differently, use interface.
- Interfaces are like utility, which can be implemented any class.
- interface is incomplete, so you can not create object of it, but we can create object of the classes, which are implementing method of interface.
- all method are by default public, static & abstract
- all variable are by default public, static, final
- Classes which'll implement interface need to implement all methods.
- Generally interfaces are created, so even non related class can implement it, but abstract class is created for related classes.
- interface can extends another interface
- A class can implements multiple interfaces, but extends only single classes
- A class can implements two interface which have same name & argument method
- A class can implement multiple interface & extend another class at same time
- It support run time polymorphism means method will execute as per object call.
Do watch video for more info:
This problem is similar to following:
interface in java,
what is interface in java,
what is interface in java,
create interface,
interface java,
interface,
create interface java,
interface,
java tutorial,
coding simplified,
java
CHECK OUT CODING SIMPLIFIED
I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 300+ videos. My account is Partner Verified.
★☆★ VIEW THE BLOG POST: ★☆★
★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
★☆★ SEND EMAIL At: ★☆★
When to use Interface:
- If there's classes, which'll implement functionality differently, use interface.
- Interfaces are like utility, which can be implemented any class.
- interface is incomplete, so you can not create object of it, but we can create object of the classes, which are implementing method of interface.
- all method are by default public, static & abstract
- all variable are by default public, static, final
- Classes which'll implement interface need to implement all methods.
- Generally interfaces are created, so even non related class can implement it, but abstract class is created for related classes.
- interface can extends another interface
- A class can implements multiple interfaces, but extends only single classes
- A class can implements two interface which have same name & argument method
- A class can implement multiple interface & extend another class at same time
- It support run time polymorphism means method will execute as per object call.
Do watch video for more info:
This problem is similar to following:
interface in java,
what is interface in java,
what is interface in java,
create interface,
interface java,
interface,
create interface java,
interface,
java tutorial,
coding simplified,
java
CHECK OUT CODING SIMPLIFIED
I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 300+ videos. My account is Partner Verified.
★☆★ VIEW THE BLOG POST: ★☆★
★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
★☆★ SEND EMAIL At: ★☆★
Комментарии