1, the interface from the user's perspective (using the implementation of the code) to see the problem.
2. An interface is a contract that is enforced by the compiler to collaborate between modules.
3, no member variable.
4, the member function can only declare cannot be implemented, (the default method in jdk1.8 can have method body).
The difference between an interface and an abstract class:
1. Abstract classes can have member variables,
2, can have partial realization;
3, abstract class can not be multiple inheritance, interface May;
4, the use of abstract class is the use of inheritance, but only single inheritance, and the interface is implemented using the implementation of the way, and can be implemented in multiple ways;
5, from the user's point of view, emphasizing the contract, forced collaboration between the two sides can not make mistakes.
Interfaces and classes in Java