第五天04 JAVA基礎語法(認識對象--自動裝箱、拆箱、數組基礎[一維、二維數組]、for循環、數組對象、字符串對象)(學習筆記)

自動裝箱、拆箱 Integer wrat=10; //自動裝箱 int foo=wrat; //自動拆箱 —————————————————— //在運算時,也可以進行自動裝箱與拆箱 Integer wrat=10; System.out.println(i+10); System.out.println(i++); //同樣的,foo會參考至Boolean實例,在進行&&運算時,會先將foo拆箱
相關文章
相關標籤/搜索