public List<E> foo() { // List is abstract, use ArrayList (child of List) for instances List<E> list = new ArrayList<>(); return list; }
public List<String> getList() { return this.list; }
# Use Collections.list()