Long.valueOf

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

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

<blockquote> {@code new Long(Long.parseLong(s))} </blockquote>

@param s the string to be parsed. @return a {@code Long} object holding the value represented by the string argument. @throws NumberFormatException If the string cannot be parsed as a {@code long}.

  1. Long valueOf(long l)
  2. Long valueOf(string s, int radix)
  3. Long valueOf(string s)
    class Long
    static
    valueOf
    (
    string s
    )

Meta