Long.valueOf

Returns a {@code Long} instance representing the specified {@code long} value. If a new {@code Long} instance is not required, this method should generally be used in preference to the constructor {@link #Long(long)}, as this method is likely to yield significantly better space and time performance by caching frequently requested values.

Note that unlike the {@linkplain Integer#valueOf(int) corresponding method} in the {@code Integer} class, this method is <em>not</em> required to cache values within a particular range.

@param l a long value. @return a {@code Long} instance representing {@code l}.

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

Meta