# protected

say it: **“pruh-TEK-tid”** **/prəˈtɛktɪd/**

An access modifier that permits package access and access through subclasses.

## What is **protected** in Java?

**protected** — An access modifier that permits package access and access through subclasses.

```java
class Account {
    private int balance = 20;

    public int balance() {
        return balance;
    }
}
```

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

Updated: November 17, 2026

## In other subjects

- [protected in C#](https://www.ask-codey.com/glossary/protected-c-sharp)
- [Protected in OOP](https://www.ask-codey.com/glossary/protected-oop)

Source: https://www.ask-codey.com/glossary/protected
