在定义2D动态数组时,为什么我不能像这样定义它:
List<List<Integer>> t=new List<List<Integer>();
Run Code Online (Sandbox Code Playgroud)
这样做,我得到一个错误说:
Cannot instantiate the type List<List<Integer>>
Run Code Online (Sandbox Code Playgroud)
我发现这是最好的做法 -
List<List<Integer>> t=new Arraylist<List<Integer>>();
Run Code Online (Sandbox Code Playgroud)
为什么会如此.有人帮我理解这一点.