Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
Members have full access to the forums. Advertisements are removed for registered users.
What is it supposed to do? I think you meant to iterate the array by varying i and j instead of row and column. In other words, check this line:
if ( first[row][col] == 0 ) //if the location was not selected,print "_"
Will row or col ever change?
In Java, arrays are zero-based, meaning the first element of an array is myArray and the last element of a 3-element array is myArray.