print出来是int
Integer。class则是java.lang.Integer
不清楚
基础类型的类啥意思?

解决方案 »

  1.   

    原本程序就是“Program is information,which is Bits in Context”程序原本是混沌不开,面向对象就像盘古开天地的大板斧。一下把行为和数据分的很清楚。int本是组织数据的类型,但是又衍生了操作,如何组织就出现了有操作行为的Integer。
      

  2.   

    学习下google搜到一条信息The .class keyword was added in Java v1.1 so that there would be consistency in getting to the Class objects representing both primitive types and class types. The .TYPE field of the various object wrapper classes of primitive types allows you to "go backwards" to get to the Class of the primitive type which that object wrapper "wraps". We have int.class == Integer.TYPE and Integer.class == (new Integer(0).getClass()). So, for consistency and simplicity, use the .class keyword to get the Class object. 
      

  3.   

    1楼说的很专业 通俗的讲就是  Integer具有int不具有的方法,这样让我们使用基础类型数据也很方便C#更直接一些,直接把int作为Int32类的别名使用
      

  4.   

    int是基础数据类型,也是一种类型.
      

  5.   

    Integer 是int的包装类,java对基本类型都定义了对于的包装类,方便使用的。
      

  6.   

    java是面向对象的语言,其中的所有对象都有自己的类型,int也不例外!
      

  7.   

    int,double,long这些都是基本数据类型,不具备对象的特性。一个对象就有属性和行为,但是基本数据类型没有。
    java中的Integer就是int的包装类,它定义的变量就是对象类型了,有属性和行为
      

  8.   

    int类型是一个数据类型,用int声明一个变量类型,而Integer类型是int的一个包装类,修饰类,可用Integer类的很多方法进行操作,如将数字值的字符串转换成整型,说白了Integer类型可以提供很多的方法可以使用,Integer类型在int类型的外层,int在Integer的里面,而Integer的功能就是为int存在的,就当Integer是int的强类,提供多种功能方法!