1.Integer.parseInt(s)与Integer.valueOf(s)的区别
源码:
public static int parseInt(String s) throws NumberFormatException {
return parseInt(s,10);
}
public static Integer valueOf(String s) throws NumberFormatException {
return new Integer(parseInt(s, 10));
}
故,Integer.valueOf(s)比Integer.parseInt(s) 多创建了一个Integer对象。