📅  最后修改于: 2022-03-11 14:52:35.789000             🧑  作者: Mango
In Java, List is an interface. That is, it cannot be instantiated directly.
Instead you can use ArrayList which is an implementation of that interface
that uses an array as its backing store (hence the name).
Since ArrayList is a kind of List, you can easily upcast it:
List mylist = new ArrayList();
-source: stackoverflow.com