且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通用类型的ArrayList的数组列表

更新时间:2023-02-26 22:55:34

您可以简单地做

List<List<String>> l = new ArrayList<List<String>>();

如果你需要列出的数组,你可以做

If you need an array of Lists, you can do

List<String>[] l = new List[n];

和放心地忽略或燮preSS警告。

and safely ignore or suppress the warning.