Integer.valueOf

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

<p>In other words, this method returns an {@code Integer} object equal to the value of:

<blockquote> {@code new Integer(Integer.parseInt(s))} </blockquote>

@param s the string to be parsed. @return an {@code Integer} object holding the value represented by the string argument. @exception NumberFormatException if the string cannot be parsed as an integer.

  1. Integer valueOf(int i)
  2. Integer valueOf(string s, int radix)
  3. Integer valueOf(string s)
    class Integer
    static
    valueOf
    (
    string s
    )

Meta