I don't think you want to increment "i" here
for (int j = 0; j<grid[0].length; i++){
:P
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Look at the following two lines
for (int i = 0; i<grid.length; i++){
for (int j = 0; j<grid[0].length; i++){
Which variable is being incremented at the end of the second for loop? Is that the one you wanted to increment? I don't think so.
Edit: And I'm justtoo slow! ;-)
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Ha! You're too slow masijade!!
:)
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Don't worry about it. Happens all the time. Let me guess, a cut-n-paste error. ;-)
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Don't worry about it. Happens all the time. Let me guess, a cut-n-paste error. ;-)
Or the fact that on most keyboards I and J are right next to each other, diagonally. Also when in lowercase they look similar.
jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53