Tuesday, November 25, 2008

Booleans

Java has a simple type called Boolean, for logical values. It can have only one of two possible values, true or false. Boolean is also the type required by the conditional expressions that govern the control statements such as if and for.When a Boolean value is output by println (),”true” or “false” ids displayed. Second the value of Boolean variable is sufficient by itself to control if statement. Third the outcome of a relational operator such as <, is a Boolean value.

0 comments: