Home > Java > Javagetting Started > body text

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

王林
Release: 2020-05-08 09:49:39
Original
16256 people have browsed it

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!

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