亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

“成員變量默認初始化為0”,一句略有點籠統:字符串類型不是為null的嘛…

正在回答

1 回答

老師應該是說int類型成員變量的初始值為0;其他八種成員變量的默認初始值是

For type byte, the default value is zero, that is, the value of (byte)0.?
For type short, the default value is zero, that is, the value of (short)0.?
For type int, the default value is zero, that is, 0.?
For type long, the default value is zero, that is, 0L.?
For type float, the default value is positive zero, that is, 0.0f.?
For type double, the default value is positive zero, that is, 0.0d.?
For type char, the default value is the null character, that is, '\u0000'.?
For type boolean, the default value is false.

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Java入門第二季 升級版
  • 參與學習       531142    人
  • 解答問題       6326    個

課程升級!以終為始告別枯燥,在開發和重構中體會Java面向對象編程的奧妙

進入課程
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號