阅读背景:

java装箱拆箱时都发生了什么?

来源:互联网 

一、装箱

我们先看装箱,有如下代码:

public class Box {
    public void packing() {
        Integer  i = 1;
        Float f = 2.0f;
        Long L = 3L;
        Boolean b = true;
        Short s = 5;
        Double d = 6.0;
        Character c = 'A';
        Byte t = 7;
    }
}public class Box



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: