Home  >  Article  >  Java  >  What are the two values ​​of boolean type in java language

What are the two values ​​of boolean type in java language

王林
王林Original
2020-05-08 09:49:3916228browse

What are the two values ​​of boolean type in java language

Introduction to Boolean data type (boolean):

In the Java language, the boolean type has only two values, namely: true and false.

(Video tutorial recommendation: java video)

Unlike in C language, 0 and 1 can represent false and true. The boolean type occupies 1 byte when stored at the bottom, because when actually stored, the bottom layer of false is 0 and the bottom layer of true is 1.

The Boolean type is very important in actual development and is often used in logical operations and conditional control statements.

Recommended tutorial: java entry program

The above is the detailed content of What are the two values ​​of boolean type in java language. 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