Long.valueOf

Returns a {@code Long} object holding the value extracted from the specified {@code String} when parsed with the radix given by the second argument. The first argument is interpreted as representing a signed {@code long} in the radix specified by the second argument, exactly as if the arguments were given to the {@link #parseLong(java.lang.String, int)} method. The result is a {@code Long} object that represents the {@code long} 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, radix))} </blockquote>

@param s the string to be parsed @param radix the radix to be used in interpreting {@code s} @return a {@code Long} object holding the value represented by the string argument in the specified radix. @throws NumberFormatException If the {@code String} does not contain a parsable {@code long}.

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

Meta