# public

An access modifier that makes a type or member broadly accessible.

## What is **public** in Java?

**public** — An access modifier that makes a type or member broadly accessible.

```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/subjects/java/journeyman)

Updated: September 27, 2026

## In other subjects

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

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