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.

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

Updated

In other subjects