The parseint (String s) method is a static method of class integer, and its function is to convert the formal parameter s to integers, such as:
Interger.parseint ("1") =1;
Integer.parseint ("a") =20;
Integer.parseint ("324") =324;
Of course, the integers represented by s must be legitimate, or they would throw an exception.
valueof (String s) is also a static method of the integer class, which is to convert the formal parameter s to an integer object,
What is an integer object, and the integer is the basic data type int type wrapper class, is to wrap int into a class, which is necessary in many situations. If you do not understand, you think int is the mini version of the Integer, easy to use a lot, but also lost some features, OK, look at the code:
interger.valueof ("123") =integer (123)
The integer (123) is the object representation of integer 123, and it calls the Intvalue () method, which converts the object representation of 123 to the basic data 123