Home >Java >JavaBase >How many bytes does the int type occupy in java?

How many bytes does the int type occupy in java?

尚
Original
2019-12-04 16:43:1716479browse

How many bytes does the int type occupy in java?

The number of bytes occupied by several data types in java is as follows:

How many bytes does the int type occupy in java?

As you can see from the picture above Int in java occupies 4 bytes.

Byte (Byte) is a unit of measurement used by computer information technology to measure storage capacity. It is a string of binary digits processed as a unit and is a small unit that constitutes information. The most commonly used byte is an octet, that is, it contains an eight-bit binary number.

Byte is the basic unit of computer:

1 and 0 are the basic units of computer storage, including everything seen on the computer now is composed of two numbers: 1 and 0 , one is a bit, 8 bits (bit) is a byte, the images and videos we see in the computer are all obtained by the computer through the calculation of countless 1s and 0s in the memory.

For more java knowledge, please pay attention to the java basic tutorial column.

The above is the detailed content of How many bytes does the int type occupy in java?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn