KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm getting an error, and can't find out how to solve it. I add a int to an ArrayList. int n = 1; ArrayList list = new ArrayList(); list.add( n ); Further down, I try to put it back in another int: grid[ y ][ x ] = list.get(0); I also tried this: grid[ y ][ x ] = (int) list.get(0); But it doesn't work, I get this error: found : java.lang.Object required: int grid[ y ][ x ] = (int)list.get(0); ^ I hope someone can help me.
Tags (comma-separated)
Save Edits
Cancel