Java 中的所有处理都放在了对象当中,那么我想知道int 是相当于类的什么数据成员??

解决方案 »

  1.   

    int ,float ,double 是原生类型,好像概念上不算作object,虽然说java里处处是object
      

  2.   

    那么int 是Integer的数据成员吗??
      

  3.   

    不清楚你说的数据成员是什么意思``
      Integer是int的封装类,里面有很多进行处理的静态方法
      Integer是对象而int不是,内存的分配位置也不一样
      

  4.   

    我想可能在Integer类里面会有一个private的数据成员是int XXX;的明白了.....
    Float 类的一个成员函数....
     float floatValue() 
              返回这个 Float 对象的 float 值。
      

  5.   

    int 是简单数据类型
    Integer 是类java.lang.Integer
    也就是说Integer i == null可以
    但是int i == null就不可以
      

  6.   

    int是一个值,也叫整数类型
    INGER是一个类所以在类INTER会有很多的方法及属性,但INT没有
      

  7.   

    i是Integer的引用,null是什么??当然不一样了......
      

  8.   

    我认为int只是JVM实现内存分配的一种手段......
      

  9.   

    我想知道既然有了Integer那么还要int这种基本数据类型是什么原因??
      

  10.   

    int基本类型。Integer是包装类。
      

  11.   

    我想知道既然有了Integer那么还要int这种基本数据类型是什么原因??
    -----------------------------------
      int是一种基本数据类型,而Integer是相应于int的类类型,称为对象包装。
      实现这种对象包装的目的主要是因为类能够提供必要的方法,用于实现基本数据类型的数值与可打印字符串之间的转换,以及一些其他的实用程序方法;
      另外,有些数据结构库类只能操作对象,而不支持基本数据类型的变量,包装类提供一种便利的方式,能够把基本数据类型转换成等价的对象,从而可以利用数据结构库类进行处理。
      

  12.   

    int只是个数据类型,而Integer则是个类,有自己的方法,也可以把它理解为一个容器
      

  13.   


    int:  数字类型
    Integer:  数字类数字类型int可以直接进行加、减、乘、除运算操作,数字类Integer不可以。
    数字类Integer拥有自己的属性与方法,数字类型int本身不存在属性与方法。
      

  14.   

    int是简单数据类型
    Integer是对象类我想知道既然有了Integer那么还要int这种基本数据类型是什么原因??
    -----------------------------------向上兼容
      

  15.   

    int vs Integer 
    Newbies are often confused by the difference between int and Integer. 
    To properly understand the difference, you should read an introductory textbook on Java. I will make a small stab at answering here. Everything I say here applies analogously to char and Character, short and Short, long and Long, float and Float, double and Double. Definitions
    An int is a primitive. It is not an Object. An int is a high performance, streamlined beast for calculating numbers in the range -2,147,483,648 [-231] aka Integer.MIN_VALUE to +2,147,483,647 [2 31-1] aka Integer.MAX_VALUE. An int is a bare bones 32-bit chunk of information. int variables are mutable. Unless you  them final, you can change their value at any time. 
    An Integer, is a Object that contains a single int field. An Integer is much bulkier than an int. It is sort like a Fedex box to contain the int. Integers are immutable. If you want to affect the value of a Integer variable, the only way is to create a new Integer object and discard the old one. 
      

  16.   

    int是一个值,也叫整数类型
    INGER是一个类所以在类INTER会有很多的方法及属性,但INT没有
    ====================================这个回复强~
      

  17.   

    int是基本数据类型,INTEGER是一个对象
      

  18.   

    public final class Integer extends Number implements Comparable<Integer> {
        /**
         * A constant holding the minimum value an <code>int</code> can
         * have, -2<sup>31</sup>.
         */
        public static final int   MIN_VALUE = 0x80000000;    /**
         * A constant holding the maximum value an <code>int</code> can
         * have, 2<sup>31</sup>-1.
         */
        public static final int   MAX_VALUE = 0x7fffffff;    /**
         * The <code>Class</code> instance representing the primitive type
         * <code>int</code>.
         *
         * @since   JDK1.1
         */
        public static final Class<Integer> TYPE = (Class<Integer>) Class.getPrimitiveClass("int");    /**
         * All possible chars for representing a number as a String
         */
        final static char[] digits = {
    '0' , '1' , '2' , '3' , '4' , '5' ,
    '6' , '7' , '8' , '9' , 'a' , 'b' ,
    'c' , 'd' , 'e' , 'f' , 'g' , 'h' ,
    'i' , 'j' , 'k' , 'l' , 'm' , 'n' ,
    'o' , 'p' , 'q' , 'r' , 's' , 't' ,
    'u' , 'v' , 'w' , 'x' , 'y' , 'z'
        };在你的C:\Program Files\Java\jdk1.5.0下面有一个src的压缩包里面有java的源文件你可以自己研究研究
      

  19.   

    java不是真正意义上的面向对象的语言
    它里面不是处处是对象 
    因为它的数据类型除了类和接口等引用数据类型外
    还包含了面向过程的基本数据类型 
    只是为了让广大程序员学习者容易接受
      

  20.   

    JAVA交流群-22065798
    互相学习  互相提高
      

  21.   

    刚刚看到一本参考书,java是完全面向对象的,但是数据类型不是,但是数据类型的存在是出于效率的缘故,在面向对象中引入数据类型,不会对执行效率产生太大的影响....