How to check if char is in a double char array? Java -
i have array in java:
public static char array[][] = new char[3[3];
during running program array fills characters. how can check if array[3][3]
has character' '(space) return true
? thanks.
do try ?
public boolean check(char[][] array){ for(int i=0; i<char.length; i++){ for(int j=0; j<char[i].length; j++){ if(char[i][j] == ' ') return true ; } } return false; }
i advice read algorithm tutorial, it's base !!
Comments
Post a Comment