java - Array compare string -
hi im trying figure out why code isn't doing want do. when run code if statement in loop. changed logic around loop time. im not sure why .
(int col =0; col< s ; col++){ system.out.print(col+ ": "); (int row = 0; row<s; row++) { x=val[row][col]; if (table[row][col]==row) { system.out.print(x+1); } //system.out.print(val[col][row]+" "); if (row+1==s) system.out.println(); } }
you have semicolon @ end of if statement, remove it.
if (x==2);
Comments
Post a Comment