Normally if we want to initialize a generic non-primitive ArrayList we do this
ArrayList> arrayList = new ArrayList(); <
ArrayList> arrayList = new ArrayList();
Try using following
public List getList(Class requiredType) { return new ArrayList(); } public void useList() { List ints = getList(Integer.class); List lists = getList(String.class); }