import java.util.*; class MyList extends ArrayList {} class Test { public void test() { List list = new ArrayList(); list.add(new MyList()); } }