Name
java.lang.Long
Synopsis
This class is a smaller counterpart to the J2SE
Long
class. It provides an object wrapper around a
single long
primitive data type. The class
provides minimum and maximum constant values that can be used to test
the legal size of a long
. The value of the
object’s long
is accessed using the
longValue()
method. In addition, the
parseByte()
and toString()
methods can convert a number from a String
to a
long
, and vice versa, with an optionally specified
radix.
public final classLong
{ // public constants public static final longMIN_VALUE
; public static final longMAX_VALUE
; // static methods public static longparseLong
(String s) throws java.lang.NumberFormatException; public static longparseLong
(String s, int radix) throws java.lang.NumberFormatException; public static StringtoString
(long i); public static StringtoString
(long i, int radix); // public constructor publicLong
(long value); // public instance methods public booleanequals
(Object obj); public inthashCode
(); public longlongValue
(); public StringtoString
(); }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.