January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.lang.Long
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(); }
Read now
Unlock full access