Home >Java >javaTutorial >How many bits does java long occupy?
java long occupies 64 bits, because one byte is equal to 8 bits, so long occupies 8 bytes, which is 64 bits; for other types, float occupies 4 bytes or 32 bits, and char occupies 2 Bytes are 16 bits.
[Related learning recommendations: java basic tutorial]
java long occupies 64 bits
1. Byte: byte: a unit of measurement used to measure storage capacity; bit: bit
2. One byte is equal to 8 bits. 1byte = 8bit
Integer type:
Floating point type:
char type:
char occupies 2 bytes and 16 bits, so a char type can store one Chinese character.Boolean type
boolean: (true or false) (not specified how many bytes 1 byte 1 bit 4 bytes)Related recommendations:
The above is the detailed content of How many bits does java long occupy?. For more information, please follow other related articles on the PHP Chinese website!