自动装箱:
public final class Integer extends Number implements Comparable<Integer> {
public static Integer valueOf(int i) {
if(i >= -128 && i <= IntegerCache.high)
return IntegerCache.cache[i + 128];
else
return new Integer(i);
}
}
拆箱:
public final class Integer extends Number implements Comparable<Integer> {
private final int value;
public Integer(int value) {
this.value = value;
}
public int intValue() {
return value;
}
}
望采纳,在Integer类的源码中你会找到的