# Logical Operators

*noun*

say it: **“LOJ-ih-kul OP-uh-ray-terz”** **/ˈlɑdʒɪkəl ˈɑpəreɪtərz/**

The symbols && (and), || (or) and ! (not) that combine or flip true-or-false conditions.

## What is **Logical Operators** in Java?

**Logical Operators** — Operators that combine or reverse boolean conditions.

```java
class Venue {
    boolean canEnter(int age) {
        boolean isAdult = age >= 18;
        boolean isSenior = age >= 65;

        if (isAdult && !isSenior) {
            return true;
        }

        return false;
    }
}
```

## In a sentence

- “With **logical operators** I checked that the username was filled in && the password was at least 8 characters.”

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

- [Logical Operators in C#](https://www.ask-codey.com/glossary/logical-operators-c-sharp)
- [Logical Operators in JavaScript](https://www.ask-codey.com/glossary/logical-operators-javascript)
- [Logical Operators in MongoDB](https://www.ask-codey.com/glossary/logical-operators-mongodb)
- [Logical Operators in PowerShell](https://www.ask-codey.com/glossary/logical-operators-powershell)
- [Logical Operators in Python](https://www.ask-codey.com/glossary/logical-operators)

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