I have the following code:
public boolean prontoParaJogar() throws RemoteException {
int i;
int j;
if (this.jogadores==2) {
this.jogando=1;
for (i=0;i<3;i++)
for(j=0;j<3;j++) {
this.tabuleiro[i][j]=0;
}
for (i=0;i<3;i++) {
System.out.println("Linha "+i+": ");
System.out.print(this.tabuleiro[i][0]+' ');
System.out.print(this.tabuleiro[i][1]+' ');
System.out.print(this.tabuleiro[i][2]);
System.out.println("");
}
return true;
} else {
return false;
}
}
它正在打印以下退出信息:
行0: 32320 行1: 32320 行2: 32320 行0: 32320 行1: 32320 行2: 32320这不是我预期的结果。应该是以下输出:
行0: 0 0 0 行1: 0 0 0 行2: 0 0 0我无法弄清楚为什么它没有按预期运行。