|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Integer
public final class Integer
The Integer class provides several methods for converting an
int to a String and a String
to an int, as well as other constants and methods
useful when dealing with an int.
| all |
| Field Summary | |
|---|---|
static int |
MAX_VALUE
A constant holding the maximum value an int can
have, 215-1. |
static int |
MIN_VALUE
A constant holding the minimum value an int can
have, -215. |
| Constructor Summary | |
|---|---|
Integer()
|
|
| Method Summary | |
|---|---|
static int |
parseInt(String s)
Parses the string argument as a signed decimal integer. |
static String |
toHexString(int i)
Returns a string representation of the integer argument as an unsigned integer in base 16. |
static String |
toString(int i)
Returns a String object representing the
specified integer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, notifyAll, wait |
| Field Detail |
|---|
public static final int MAX_VALUE
int can
have, 215-1.
public static final int MIN_VALUE
int can
have, -215.
| Constructor Detail |
|---|
public Integer()
| Method Detail |
|---|
public static int parseInt(String s)
'-'
('\u002D') to indicate a negative value.
s - a String containing the int
representation to be parsed
public static String toHexString(int i)
The unsigned integer value is the argument plus 216
if the argument is negative; otherwise, it is equal to the
argument. This value is converted to a string of ASCII digits
in hexadecimal (base 16) with no extra leading
0s. If the unsigned magnitude is zero, it is
represented by a single zero character '0'
('\u0030'); otherwise, the first character of
the representation of the unsigned magnitude will not be the
zero character. The following characters are used as
hexadecimal digits:
These are the characters0123456789abcdef
'\u0030' through
'\u0039' and '\u0061' through
'\u0066'.
i - an integer to be converted to a string.
public static String toString(int i)
String object representing the
specified integer. The argument is converted to signed decimal
representation and returned as a string.
i - an integer to be converted.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||