# boolean

*noun*

say it: **“BOO-lee-un”** **/ˈbuliən/**

A type with only two possible values, true and false, used for yes-or-no answers and conditions.

## What is **boolean** in Java?

**boolean** — A primitive type whose only values are true and false.

```java
class Order {
    int itemCount = 3;
    double price = 4.50;
    char size = 'M';
    boolean paid = true;
}
```

## In a sentence

- “I kept a **boolean** called isLoggedIn and flipped it to true after the password matched.”

Level: Novice · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=1)

Updated: October 26, 2026

## In other subjects

- [Boolean in General](https://www.ask-codey.com/glossary/boolean)
- [Boolean in JavaScript](https://www.ask-codey.com/glossary/boolean-javascript)

Source: https://www.ask-codey.com/glossary/boolean-java
