February 2017
Beginner
1056 pages
28h 57m
English
booleanHe who would distinguish the true from the false must have an adequate idea of what is true and false.
—BENEDICT SPINOZA, Ethics
Truth is truth
To the end of reckoning.
—WILLIAM SHAKESPEARE, Measure for Measure
The type boolean is a primitive type, just like the types int, double, and char. As with these other types, you can have values of type boolean, constants of type boolean, variables of type boolean, and expressions of type boolean. However, the type boolean specifies only two values: true and false. You can use the two values true and false in a program, just as you use numeric constants, such as 2 and 3.45, and character constants, such as ‘A’.
Boolean variables can be used, among other things, ...
Read now
Unlock full access