Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Example:
A Vehicle can be an interface with a method.
MotorVehicle and Aircraft are abstract classes.
Car, Bus etc are subclass of MotorVehicle.
Airbus, Cargo Planes, fighter planes are subclass of aircraft.
As per http://docs.oracle.com
In the Java programming language, an interface is a reference type, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types. Method bodies exist only for default methods and static methods. Interfaces cannot be instantiated—they can only be implemented by classes or extended by other interfaces.
Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. However, with abstract classes, you can declare fields that are not static and final, and define public, protected, and private concrete methods. With interfaces, all fields are automatically public, static, and final, and all methods that you declare or define (as default methods) are public. In addition, you can extend only one class, whether or not it is abstract, whereas you can implement any number of interfaces.