-4

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.
Community
  • 1
  • 1
  • 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 01: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 01:57

1 Answers1

0

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.

user unknown
  • 32,929
  • 11
  • 72
  • 115