The Java Byte
In Java literature, a byte refers to a group of 8 bits as in the mainframe. Java primitive data types are independent of the byte size of any native machine. Most that run Java are Unicode-based, 16-bit byte machines.
| Type | Bytes | Bits |
byte | 1 | 8 |
short | 2 | 16 |
int | 4 | 32 |
long | 8 | 64 |
float | 4 | 32 |
double | 8 | 64 |
char | 2 | 16 |
boolean | 1 | 8 |