Description: Java : Primitive Types
There are a variety of primitive types defined in the Java language. They are common to the C/C++ language, and are described below. There are a number of complexities and intricacies associated with these types, but for now the basics will suffice.
The boolean Type
In Java and other languages, the Boolean type represents a truth value with two possible states: On or off, true or false. Booleans are used in conditional statements such as if and else, while and the test condition in for loops.