阅读背景:

在尝试调用2D数组的可能void元素时,应该如何避免java.lang.ArrayIndexOutOfBoundsException

来源:互联网 

I am trying to make a tic tac toe game and am new to java. I am getting outofbounds at the first if statement within the method isHorizontalWin and I am assuming it would happen within isVerticalWin as well. Correct me if I am wrong but I believe it is happening because part of gameboard has no value so the if statement is outofbounds however I am unsure in how to fix this. A side note: the formatting got messed up a little bit when pasting the code so I had to make some of the JOptionPanes go onto multiple lines to fit. Thanks!I am trying to make a tic tac toe game and am n




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: