Java variables can be categorized into the following seven types:
- Class Variable
- Instance Variable
- Array Component Variable
- Method Parameter Variable
- Constructor Parameter Variable
- Exception Handler Parameter Variable
- Local Variable
1) Class Variable
A java class variable is a field declared using the keyword static within a java class, or with or without the keyword static within a java interface declaration.
2) Instance Variable
Java variables that are declared without static keyword are instance variables.
3) Array Component
Array components are unnamed java variables that are created and initialized to default values whenever a new java array object is created.
4) Method Parameter
Java variables declared in the method declaration signature are method parameter variables. Whenever a java method is invoked a variable is created in the same name as it is declared.
5) Constructor Parameter
This is similar to the java method parameter variable. The same way, for all the java variables declared in the constructor a variable is created whenever it is invoked.
6) Exception Handler Parameter
Java variables that are declared in the catch clause of a java exception handling mechanism. Whenever a java exception is caught, exception handler parameter variable is created.
7) Local Variable
Java variables that are declared in a block inside a java method or for loop is called a java local variable.
Reference: Java Language Specification 4.12.3



















is good and more information aout topic it is better i think
guru on December 19th, 2010 1:52 pmTHANX…….
CVU on February 17th, 2011 9:37 amits very interesting
Ganesh on March 21st, 2011 11:11 amVery Good Information For all Students Of Programing Language.
ThanK’S
SYED SAFDAR SHAH on April 28th, 2011 6:59 pm[...] example, imagine if you had to store the list of countries in individual java variables and manipulate them. You will have more than hundred variables to manage. Can’t imagine, it [...]
Java Array&hellip on May 7th, 2011 7:12 amI have my Java functions test tomorrow. Thanks for the help.
Java Learner on June 13th, 2011 2:40 pmVey good and easily understandable information
Thankz
Imthiaz on July 13th, 2011 7:22 amThanx alot it’s very helpful
Abhi on July 18th, 2011 9:40 am[...] in java. You can store and retrieve a ‘value’ using a ‘key’ and it is an identifier of the value stored. It is obvious that the ‘key’ should be [...]
Java Hashtable&hellip on August 17th, 2011 8:52 pmPlease provide the thread safety information for all the variables in multi threaded environment
RaMesh on September 8th, 2011 12:29 pmplease provide a java script for g-five n90
akash on October 6th, 2011 1:33 pmI like it.
Aziz on December 6th, 2011 7:08 pmcontinue it.
VERY GUD SIR
Anonymous on December 18th, 2011 11:34 amthank you sir for giving my answer
ajai kumar gaur on December 25th, 2011 5:40 pm