天天看點

自動裝箱、自動拆箱

測試自動裝箱、自動拆箱

/**

*/

public class testautobox {

public static void main(string[] args) {

integer a = 234; //自動裝箱。integer a = integer.valueof(234);

int b = a; //自動拆箱。編譯器會修改成:int b = a.intvalue();

繼續閱讀