Home > Java > javaTutorial > body text

Java Boolean is how many bytes

Guanhui
Release: 2020-05-21 13:49:28
Original
3506 people have browsed it

Java Boolean is how many bytes

Java Boolean is how many bytes

The Boolean type in Java is not given a precise definition, and in "Java Virtual Machine "Specification" gives the definition that the Boolean type is 4 bytes, and the Boolean array is 1 byte. The specifics depend on whether the virtual machine implementation follows the specification, so 1 byte and 4 bytes are both valid. possible.

The number of bytes occupied by Java basic data types

int 4 bytes (32 bits)

short 2 bytes (16 bits)

long 8 bytes (64 bits)

byte 1 byte (8 bits)

float 4 bytes (32 bits)

double 8 bytes (64 bits)

char 2 bytes (16 bits)

Recommended tutorial: "Java Tutorial"

The above is the detailed content of Java Boolean is how many bytes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!