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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -