给出如下代码,请给出结果.

class Two{
    Byte x;  //此处为Byte是byte的包装类型,初始化为null而不是0
}
class PassO{   //注意如今没有 public 不要紧的
    public static void main(String[] args){
        PassO p=new PassO();
        p.start();
    }
    void start(){
        Two t=new Two();
        System.out.print(t.x+” ”);
        Two t2=fix(t);
        System.out.print(t.x+” ” +t2.x);
    }
    Two fix(Two tt){
        tt.x=42;
        return tt;
    }
}

相关文章
相关标签/搜索