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 long MIN_VALUE;
   public static final long MAX_VALUE;

   // static methods
   public static long parseLong(String s) throws java.lang.NumberFormatException;
   public static long parseLong(String s, int radix) throws
      java.lang.NumberFormatException;
   public static String toString(long i);
   public static String toString(long i, int radix);

   // public constructor
   public Long(long value);

   // public instance methods
   public boolean equals(Object obj);
   public int hashCode();
   public long longValue();
   public String toString();
}

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.