Variables

Variables

Variables are memory locations that hold a value. So when you are using a variable you are accessing that memory location to get the value. Three different types of variables, Fields, which is the global variable which can be used in all of your methods and constructors. Instance Variable which is the local variable and can only be used where it is made(so it can only be used within the braces it is declared ) and a parameter which is a variable that is passed by value to a method or constructor.

For more information on each type go to:

Fields

Parameters

Instance Variables