該代碼正確打印出「x [2] [2]爲false」,我的問題是明白爲什麼會發生這種情況。 (這是正確的,我只需要有人向我「電腦說話」這個邏輯 - 我在4小時內完成我的決賽,並且不會再打擾任何人:))
非常感謝您的協助!布爾數組問題
public static void main(String[] args) {
boolean[][] x = new boolean[3][];
x[0] = new boolean[1];x[1] = new boolean[2];
x[2] = new boolean[3];
System.out.println("x[2][2] is " + x[2][2]);
}
@Крысa101101011 –
計算機說'不' – DaveRlz
未來,不要等到最後幾個小時才發現你不知道語言的關鍵。你會更高興,相信我。 – Paul