An Interface Defines a Type
Assume the classes Picture and StudentRecord both implement the Storable interface:
public class StudentBody {
Stream s;
. . .
public void register(Picture id_photo, StudentRecord id_card) {
save(id_photo);
save(id_card);
}
public void save(Storable o) { // o has type Storable
o.store(s);
}
}