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!