可能重复:
Java how to: Generic Array creation
Generic array creation error
private ArrayList<Integer>[][] potentialList = new ArrayList<Integer>[9][9];
有人,请向我解释为什么这句话给了我一个:
--------------------Configuration: <Default>--------------------
SolveSudoku.java:31: error: generic array creation
private ArrayList<Integer>[][] potentialList = new ArrayList<Integer>[9][9];
//The error is on the "n" of new ArrayList.
Process completed.
答案 0 :(得分:0)
我们不知道你想做什么,也许:
private ArrayList<Integer[][]> potentialList = new ArrayList<Integer[][]> ();
这将是2dim-Integer-Arrays的列表。