标题: int.class 和Integer.class的区别 [打印本页] 作者: 叶涛 时间: 2011-10-13 18:25 标题: int.class 和Integer.class的区别 int.class 和Integer.class的区别?什么时候用Integer.class?作者: 敖东 时间: 2011-10-13 19:22
int和Integer之间是简单类型和包装类之间的关系。
但这两个的class对象则没有太多的关系,是Class类的两个不同实例而已。 作者: 苏志伟 时间: 2011-10-13 19:33
The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.
简单说是一个聚合关系,我也是查资料的.
package java.lang;
public final class Integer extends Number implements Comparable<Integer> {