为什么以下打印老板而不是低音?
String boss = "boss";
char[] array = boss.toCharArray();
for(char c : array)
{
if (c== 'o')
c = 'a';
}
System.out.println(new String(array)); //How come this does NOT print out bass?It prints boss.
Run Code Online (Sandbox Code Playgroud) int Site[][] = new int[N][N];
for(int[] i : Site)
for(int j:i)
Site[i][j]=1;
Run Code Online (Sandbox Code Playgroud)
此代码显示一些错误.请更正代码.