Kotlin TutorialLesson 11Free preview
Kotlin Booleans
This lesson is part of Kotlin · All levels
Summary
This lesson reviews the Boolean data type in Kotlin that is worth true or false. Boolean values are often generated from comparison expressions and are used to direct the logic controls of a program. This lesson guides how to use boolean operations accurately and safely.
Key points
- The 'Boolean' data type has only two values: 'true' and 'false'
- The comparison operator (>, <, >=, <=, ==,!=) produces a Boolean-type value
- Supports standard logic operators AND (&&), OR (D), and NOT (!)
- It can be a nullable boolean ('Boolean?') that has three possible values: true, false, or null.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.