Boolean Data Types | Heaton Research

Boolean Data Types

Get the entire book!
Java for the Beginning Programmer

The final data type group is boolean. Boolean data types can hold only two values: true and false. A boolean is created much like any other variable in Java.

boolean done;
done = false;

Here a boolean named “done” is created and assigned to a value of false.

Copyright 2005-2008 by Heaton Research, Inc.