# What do final / static / public / private tags mean?

**URL:** https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002
**Category:** Beginners
**Created:** [January 12, 2021, 10:11pm UTC](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002 "2021-01-12T22:11:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [January 12, 2021, 10:11pm UTC](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002/1 "2021-01-12T22:11:16Z")

</div>

Hi!  
In the last month, I’ve been active on the forum. I saw quite a lot of things like `final int b = 3`, which means that `b` does not change. But what do the others mean? I tried using `public int b = 123` inside of setup, but I received an error message. Similarly the `private String abc` function also got an error message. Is it somehow related that the variables defined at the top of the code are public, while the ones inside of if statements, functions, classes, … are private?

Thanks!

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [January 12, 2021, 10:31pm UTC](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002/2 "2021-01-12T22:31:41Z")

</div>

> [@CodeMasterX](#):
>
> Is it somehow related that the variables defined at the top of the code are public,

- Variables defined outside functions are actually Java fields.
- Anything inside “.pde” files are inside a [PApplet](https://discourse.processing.org/t/terminology-function-method-and-event/16855) subclass.
- That’s why we can directly access [PApplet](https://processing.github.io/processing-javadocs/core/processing/core/PApplet.html) members w/o the operator `.` dot:

> **[. (dot) / Reference](https://processing.org/reference/dot.html)**
>
> Provides access to an object's methods and data. An object is one instance of a class and may contain both methods (object functions) and data (object variables and constants), as specified in the cla…

---

<div class="post-metadata">

### Author: ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)
#### Post date: [January 12, 2021, 10:43pm UTC](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002/3 "2021-01-12T22:43:07Z")

</div>

This is a concept in programming languages / computer science called **scope**.

Scope defines which parts of a program are accessible (readable / writable / callable) by other parts of a program.

Processing is just a layer on top of Java, so any tokens like `public` or `private` are defined by the Java language.

> **[Understand variable scoping and access control](https://openclassrooms.com/en/courses/5667431-learn-programming-with-java/5906889-understand-variable-scoping-and-access-control)**
>
> Find out how rewarding programming can be! In this course, you'll learn the principles of object-oriented programming, get hands-on practice with interactive exercises, and start your very own app!
