La rappresentazione interna รจ in complemento a 2.
Classe | #byte | #bit | MIN_VALUE | MAX_VALUE | |
---|---|---|---|---|---|
byte | Byte | 1 | 8 | -27 -128 |
27-1 127 |
short | Short | 2 | 16 | -215 -32768 |
215-1 32767 |
int | Integer | 4 | 32 | -231 -2147483648 |
231-1 2147483647 |
long | Long | 8 | 64 | -263 -9223372036854775808 |
263-1 9223372036854775807 |
java.lang.Integer
public final class Integer extends Number implements Comparable
Costruttori
Integer(int) Integer(String)
Metodi
byte |
byteValue() |
short |
shortValue() |
int |
intValue() parseInt(String) |
Integer |
valueOf(int) valueOf(String) |
long |
longValue() |
float |
floatValue() |
double |
doubleValue() |
String |
toString() toString(int) toString(int, int) toBinaryString(int) toHexString(int) toOctalString(int) |
java.lang.Long
public final class Long extends Number implements Comparable
Costruttori
Long(long) Long(String)
Metodi
byte |
byteValue() |
short |
shortValue() |
int |
intValue() |
long |
longValue() parseLong(String) parseLong(String, int) |
Long |
valueOf(String) valueOf(String, int) |
float |
floatValue() |
double |
doubleValue() |
String |
toString() toString(long) toString(long, int) toBinaryString(long) toHexString(long) toOctalString(long) |
java.lang.Byte
public final class Byte extends Number implements Comparable
Costruttori
Byte(byte) Byte(String)
Metodi
byte |
byteValue() parseByte(String) parseByte(String, int) |
Byte |
valueOf(String) valueOf(String, int) |
short |
shortValue() |
int |
intValue() |
long |
longValue() |
float |
floatValue() |
double |
doubleValue() |
String |
toString() toString(byte) |
java.lang.Short
public final class Short extends Number implements Comparable
Costruttori
Short(short) Short(String)
Metodi
byte |
byteValue() |
short |
parseShort(String) |
Short |
valueOf(String) valueOf(String, int) |
int |
intValue() |
long |
longValue() |
float |
floatValue() |
double |
doubleValue() |
String |
toString() toString(short) |