摘要:
public static void test(){ Integer a=1; Integer b=1; System.out.println(a==b); System.out.println(a.equals(b)); } 输出结果可能大家都想到了是什么,没错就是: true true publ 阅读全文
posted @ 2018-02-27 10:55
帝国攻城狮
阅读(389)
评论(1)
推荐(0)
摘要:
1. int是基本数据类型,int变量存储的是数值。Integer是引用类型,实际是一个对象,Integer存储的是引用对象的地址。 2. Integer i = new Integer(100);Integer j = new Integer(100);System.out.print(i == 阅读全文
posted @ 2018-02-27 10:23
帝国攻城狮
阅读(8952)
评论(0)
推荐(4)

浙公网安备 33010602011771号