-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.
2
  • Why not simply private Integer[][] potentialList = new Integer[9][9];? Or to put that another way, why not simply use an array? Commented May 21, 2012 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. Commented May 21, 2012 at 1:57

1 Answer 1

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.

answered May 21, 2012 at 2:05

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.