java.lang
Class Integer

java.lang.Object
  extended byjava.lang.Integer

public final class Integer
extends Object

Minimal Integer implementation that supports converting an int to a String.


Field Summary
static int MAX_VALUE
          The largest value of type int.
static int MIN_VALUE
          The smallest value of type int.
 
Constructor Summary
Integer(int value)
          Constructs a newly allocated Integer object that represents the primitive int argument.
 
Method Summary
 String toString()
          Returns a String object representing this Integer's value.
static String toString(int i)
          Returns a new String object representing the specified integer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait
 

Field Detail

MIN_VALUE

public static final int MIN_VALUE
The smallest value of type int. The constant value of this field is -2147483648.

See Also:
Constant Field Values

MAX_VALUE

public static final int MAX_VALUE
The largest value of type int. The constant value of this field is 2147483647.

See Also:
Constant Field Values
Constructor Detail

Integer

public Integer(int value)
Constructs a newly allocated Integer object that represents the primitive int argument.

Parameters:
value - the value to be represented by the Integer.
Method Detail

toString

public static String toString(int i)
Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and radix 10 were given as arguments to the toString(int, int) method.

Parameters:
i - an integer to be converted.
Returns:
a string representation of the argument in base 10.

toString

public String toString()
Returns a String object representing this Integer's value. The value is converted to signed decimal representation and returned as a string.

Overrides:
toString in class Object
Returns:
a string representation of the value of this object in base 10.