I get an error message and cannot find out how to solve it.
I add int to ArrayList.
int n = 1; ArrayList list = new ArrayList(); list.add( n );
Next, I try to return it to another int:
grid[ y ][ x ] = list.get(0);
I also tried this:
grid[ y ][ x ] = (int) list.get(0);
But this will not work, I get this error:
found : java.lang.Object required: int grid[ y ][ x ] = (int)list.get(0); ^
Hope someone can help me.
Chris source share