public static Integer valueOf (String s) throws NumberFormatException

Returns an Integer object holding the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseInt(java.lang.String) method. The result is an Integer object that represents the integer value specified by the string.

In other words, this method returns an Integer object equal to the value of:

new Integer(Integer.parseInt(s))

Parameters:
s    the string to be parsed.

Returns:  an Integer object holding the value represented by the string argument.

Exceptions:
NumberFormatException    if the string cannot be parsed as an integer.