eternity5219
asked on
add integer to array list (URGENT)
HI experts,
I want to create a 2d array of time array list, called Darray
ArrayList [][] DArray= new ArrayList [9][9];
and then give it values
DArray[i][j].add((int)boar d[i][j]);
which the value is integer value of a 2d array
but it gives me compilation error
any idea how to fix it?
I want to create a 2d array of time array list, called Darray
ArrayList [][] DArray= new ArrayList [9][9];
and then give it values
DArray[i][j].add((int)boar
which the value is integer value of a 2d array
but it gives me compilation error
any idea how to fix it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes I want a 9by 9 matrix of arrayList
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
81 ArrayLists each acting as a one-dimensional array
I need to solve Sudoku with arc consistenct method, so what I really need to do is to check each cell and save all of the possible numbers for that position in one array, there could be only one number or several number, but the problem is, I have my initial sudoku board as a 2 D array, and there are some filled cells on it, which I need to move those numbers into my 3d array ,(or I was thinking about 2d Arraylist),
and I cant do this becuz I cant assign and int value to arraylist,
I need to solve Sudoku with arc consistenct method, so what I really need to do is to check each cell and save all of the possible numbers for that position in one array, there could be only one number or several number, but the problem is, I have my initial sudoku board as a 2 D array, and there are some filled cells on it, which I need to move those numbers into my 3d array ,(or I was thinking about 2d Arraylist),
and I cant do this becuz I cant assign and int value to arraylist,
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this one gives error (I use eclipse)
error is : (cannot create a generic array of arraylist)