Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind Java boolean Keyword?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ isJavaFun = true;3Order
Put the learning moves in the order that makes the concept easiest to apply.
The boolean keyword is a data type that can only take the values true or false .
Definition and Usage
Java boolean Keyword
❮ Java Keywords
Example
boolean isJavaFun = true;
boolean isFishTasty = false;
System.out.println(isJavaFun); // Outputs true
System.out.println(isFishTasty); // Outputs falseDefinition and Usage
The boolean keyword is a data type that can only take the values true or false .
Boolean values are mostly used for conditional testing (read the Java Booleans Tutorial for more information).
Related Pages
Read more about data types in our Java Data Types Tutorial .
Read more about booleans in our Java Booleans Tutorial .
❮ Java Keywords