Basics of Interfaces and Generic Types
Learning objectives
- You can use interfaces to define a contract that specifies the behavior of a class.
- You can implement the
Comparableinterface, which enables objects to be ordered and sorted. - You understand the concepts of generic classes and type parameters.
- You can implement reusable classes and methods using generic types.