August 2018
Intermediate to advanced
524 pages
14h 45m
English
The interface in our case is very simple:
public interface Sort {
void sort(Sortable collection);
}
The interface should do only one thing, sort something that is sortable. As such, we define an interface and any class that implements this interface will be Sortable:
public interface Sortable {
}