/
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
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[0] and the last element of a 3-element array is myArray[2].
/