Possible Duplicate:
Java how to: Generic Array creation
Generic array creation error

private ArrayList<Integer>[][] potentialList = new ArrayList<Integer>[9][9];

Someone, please explain to me why this statement gives me a:

--------------------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.
share|improve this question
Possible duplicate hunt: go! – Paul Bellora May 21 '12 at 1:55
Why not simply private Integer[][] potentialList = new Integer[9][9];? Or to put that another way, why not simply use an array? – Andrew Thompson May 21 '12 at 1:56
Welcome to Stack Overflow, where thousands of software professionals have answered hundreds of thousands of questions. Please search through them before asking your own. – Adam Liss May 21 '12 at 1:57
feedback

marked as duplicate by Paul Bellora, Adam Liss, AVD, Louis Wasserman, Hovercraft Full Of Eels May 21 '12 at 2:34

This question covers exactly the same content as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

We don't know what you want to do, maybe:

private ArrayList<Integer[][]> potentialList = new ArrayList<Integer[][]> (); 

This would be a list of 2dim-Integer-Arrays.

share|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.