Primitive Data Types
Data Type | Size | Default | Range |
---|---|---|---|
byte |
1 byte | 0 | -128 to 127 |
short |
2 byte | 0 | -215 to 215-1 |
int |
4 byte | 0 | -231 to 231-1 |
long |
8 byte | 0 | -263 to 263-1 |
float |
4 byte | 0.0f | N/A |
double |
8 byte | 0.0d | N/A |
char |
2 byte | \u0000 | 0 to 65535 |
boolean |
N/A | false | true / false |
Comments