Learn in the textbookData Types
DefinitionThe Boolean type (論理型) is a data type that takes only one of 2 values, true or false.
ExplanationAn expression that compares sizes or equality yields a Boolean value, which serves as the condition that steers processing in selection and repetition. In Japanese it is also called Boolean type (ブール型), while the formal term 論理型 literally means "logical type".
AnalogyThink of a light switch. It is either on or off, with nothing in between.
Memory hook"Boolean" comes from George Boole, the mathematician who turned calculations with true and false into a system.