- Java 9 Programming By Example
- Peter Verhas
- 67字
- 2021-07-02 23:37:37
Creating the interfaces
The interface in our case is very simple.
package packt.java9.by.example.ch03;
public interface Sort {
void sort(SortableCollection collection);
}
The interface should do only one thing—sort something that is sortable. As we wanted to be very general in this approach, we also have to define what sortable is. To do so, we will need another interface.
package packt.java9.by.example.ch03;
public interface SortableCollection {
}