Java Boolean Data Type

To store the true and false value ‘boolean’ data type is used. By default value of boolean data type is false.

TypeDefaultSize
booleanfalse1 bit

Write a program to demonstrate boolean data types.

Result