對不起,我真的很愚蠢的問題,我正在學習一種新的語言,並採取這樣的代碼:有史以來第一個Java程序錯誤輸出
public class Exercise01 {
int i;
char c;
public static void main(String[] args) {
Exercise01 E = new Exercise01();
System.out.println("i = " + E.i);
System.out.println("c = [" + E.c + "]");
}
}
/* Output:
i = 0
c = [
*/
爲什麼輸出不產生「]」字?它與Unicode有關嗎?
PostEdited:變量E.c未被初始化用於實驗目的。
E.c的價值是什麼? –
它在我身邊生產。這是所有的代碼? –
它也給我預期的輸出。 – luketorjussen