Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 JAVA 中有数组:
public static char array[][] = new char[3[3];
在运行程序期间,这个数组填充了一些字符。我如何检查这array[3][3]是否有字符''(空格)然后return true?谢谢。
array[3][3]
return true
你真的尝试一下吗?
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; }
我建议您阅读一些算法教程,这是基础!