AP® Computer Science A glossary

boolean

Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods

The primitive type whose only values are true and false.

Appears in the course and exam description (CED): 1.2.B.1

A boolean value is either true or false. Use it for a yes/no state, such as whether a game is over.

boolean gameOver = false;
System.out.println(gameOver);

Output:

false
Learn it properly, with a checkpoint 1.2 Variables and Data Types

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure