Interface định nghĩa contract (method signatures) mà implementations phải tuân theo.
- Trước Java 7: chỉ có public abstract methods.
- Java 8 thêm: default methods (concrete methods với implementation, giúp backward compatibility khi thêm method mới), static methods (utility functions).
- Java 9+ thêm private methods (helper cho default methods).
- Interface không có state.
- Một class có thể implement nhiều interface.
- Dùng cho: định nghĩa capability, loose coupling.