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

# Variables

## Static/class Variables

Single instance which is shared by all the classes. Sort of a global variable bound to the class where it is defined.

Try to use them as final, which makes them into constants.

```java
public class SomeClass {

   public static final String constantValue = "Some text";

}
```

## Instance Variables

Each instance of the class will have their own copy of the variable.

```java
public class SomeClass {

   private String value = "some value";

}
```

## Local Variables

Declared inside methods:

```java
public final void someMethod() {
   final String value = "some value";
}
```

## Parameters

Received by methods:

```java
public final void someMethod(final String value)
```

## More Information

* [Java Variables](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html)
