包装类型

 

包装类型除了double 、float他们的范围在127与-128之间都可以在常量池中取值

Integer a=12;

Integer b=12;

System.out.println(a==b) true;

int a=128;

int b=128;

System.out.println(a==b) false;

 

Boolean b=true;

Boolean c=true;

System.out.println(b==c) true

 

posted on 2017-01-03 06:10  老邱2  阅读(117)  评论(0编辑  收藏  举报

导航