Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How many bytes does each type of JAVA occupy? How many people?
How many bytes does each type of JAVA occupy? How many people?
In Java, * * * has eight basic data types, including four integer types, two floating-point types, 1 character type used to represent Unicode-encoded character units and 1 boolean type used to represent truth values. (One byte equals 8 bits)

Int type accounts for 32 bytes; 4 digits;

The short type accounts for 16 bytes; 2 digits;

Long type accounts for 64 bytes; 8 digits;

Floating-point type accounts for 32 bytes; 4 digits;

Double-precision type accounts for 64 bytes; 8 digits;

Char type accounts for 16 bytes; 2 digits;

Boolean type accounts for 8 bytes; 1 bit;

The byte type accounts for 8 bytes; 1 bit;

Byte definition:

Byte is a unit of measurement used by computer information technology to measure storage capacity. In some computer programming languages, it also represents data types and language characters. 1 byte equals 8-bit binary.