Java defines four kinds of variables:
I. Instance Variables a.k.a. Non-Static Fields
Instance variables store the state of an object. Each time an object of a class is instantiated a new copy of the instance variable is initialized.
II. Class Variables a.k.a Static Fields
Class variables are declared using the static modifier. You would use a class variable when every instance of a class would use the same value. There is only one copy of a class variable.
III. Local Variables
Local variables are declared and accessible only from within the body of a method, if-statement or for-loop. In other words a variable declared between braces { } is only accessible between those braces.
Ex: for(int i = 0; i < 10; i++) { int count = i + i; }
IV. Parameters
Parameters are the variables used in the signatures of methods and constructors. These are the variables that are declared in between parenthesis of methods, for-loops, and constructors.
Ex: public static void setAge(int num)
notice that int num is declared within the parenthesis, therefore it is a parameter.