你的位置:首页 > 软件开发 > Java > 再谈包装类Integer对象的比较

再谈包装类Integer对象的比较

发布时间:2015-08-21 12:00:16
public class CompareDemo { public static void main(String[] args) { int a = 128, b = 128; System.out.println(a == b); // true ...

再谈包装类Integer对象的比较

public class CompareDemo {  public static void main(String[] args) {    int a = 128, b = 128;    System.out.println(a == b); // true         Integer c = 128, d = 128;    System.out.println(c == d); // false        System.out.println(c.equals(d)); // true         Integer e = -128, f = -128;    System.out.println(e == f); // true  }}

原标题:再谈包装类Integer对象的比较

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录