> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/java/access-modifier.md).

# access modifier

![access modifier](https://513632279-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHGT1oKZbTmlBrsOv_R%2F-MHjGnugqg8MPSejRZVY%2F-MHjGooYoeZ1uHnWIP5T%2Fimage.png?alt=media\&token=cc46a1ae-7091-40e9-a0e7-48353ec19fd3)

**private** : within same class.

**defualt** : within same package.

**protected** : within same package and child class in different package.

**public** : no limit.

There are only two possible modifiers for class : **public** or (default).&#x20;

There are four possible modifiers for members(variable/method) : **public**, **protected**, (**default**), **private**.
