Boolean literals are the simplest of the literals in the Java programming language. The two possible boolean
values are represented by the literals true
and false
. These are case-sensitive. For example:
boolean flag = true; // using the 'true' literal
flag = false; // using the 'false' literal