static int parseInt(String s)
Parses the string argument as a signed decimal integer. static Integer valueOf(String s)
Returns a new Integer object initialized to the value of the specified String.你说得干好相反,parseInt 返回的是值valueOf() 返回的是静态的Integer
Parses the string argument as a signed decimal integer. static Integer valueOf(String s)
Returns a new Integer object initialized to the value of the specified String.你说得干好相反,parseInt 返回的是值valueOf() 返回的是静态的Integer
=
Integer.valueOf(String str).intValue