Something
public java v1 · immutablepublic interface Foo { myMethod();}public class Parent() {}public class Child1 extends Base implements Foo { public myMethod() { }}ArrayList<Parent> myList = new ArrayList<Parent>();myList.add(new Child1());myList.add(new Child2());myList.add(new Child3());myList.get(0).myMethod(); // Ayto edw den doyleyei, giati to MyList.get(0) epistrefei // typo Parent, enw thn methodA() thn ekane implement to ChildX