+ 1
I do not understand the differences between inheritance, extends and interfaces in JAVA
4 Respuestas
+ 1
An interface is an abstract "class" that is used to group related methods with "empty" bodies:
To access the interface methods, the interface must be "implemented" (kinda like inherited) by another class with the implements keyword (instead of extends). The body of the interface method is provided by the "implement" class.
The implements keyword is used to implement an interface.
The interface keyword is used to declare a special type of class that only contains abstract methods.
- 2
ok just
a inheritance is a "gift" to child classes
- 2
To extend you borrow from the class, this is the inheritance
- 2
The interface is a totally abstract class it is only implemented by other classes