Name

java.lang.Integer

Synopsis

This class is a smaller counterpart to the J2SE Integer class. It provides an object wrapper around a single int primitive data type. The class contains several static methods for converting an int to various formats, as well as two valueOf() methods to convert a string with an optionally specified radix back into an Integer. To dump the stored character back into a primitive int, long, or short data type, use the intValue(), longValue(), or shortValue() methods, respectively.

public final classInteger {
   // public constants
   public static final int MIN_VALUE;
   public static final int MAX_VALUE;

   // static methods
   public static int parseInt(String s, int radix) throws
      java.lang.NumberFormatException;
   public static int parseInt(String s) throws java.lang.NumberFormatException;
   public static String toBinaryString(int i);
   public static String toHexString(int i);
   public static String toOctalString(int i);
   public static String toString(int i);
   public static String toString(int i, int radix);
   public static Integer valueOf(String s, int radix) throws
      java.lang.NumberFormatException;
   public static Integer valueOf(String s) throws java.lang.NumberFormatException;

   // public constructor
   public Integer(int value);

   // public instance methods
   public byte byteValue();
   public boolean equals(Object obj);
   public int hashCode();
   public int intValue();
   public long longValue();
   public short shortValue();
   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.