当前位置: 代码迷 >> J2SE >> Integer.SIZE如何用
  详细解决方案

Integer.SIZE如何用

热度:42   发布时间:2016-04-24 14:56:18.0
Integer.SIZE怎么用
看到Integer类有几个字段,api中意思是说以二进制补码形式表示   int   值的位数

就试了一下

System.out.println   (Integer.TYPE+ "整形的最大取值范围是 "+Integer.MAX_VALUE+ "最小取值范围是 "+Integer.MIN_VALUE
+ "位数是 "+Integer.SIZE);

编译器提示在Integer.SIZE位置提示cannot   resolve   symbol:variable   SIZE   in   java.lang.Integer
问题:为什么TYPE字段、MAX_VALUE、MIN_VALUE没问题,单单SIZE有问题????

------解决方案--------------------
你的jdk是1.4的吧,SIZE属性是1.5里才有的
  相关解决方案