Types of Variables in Java

In java a variable is nothing but name, which can be used to store the values. A variable is like a container which can hold the different type contents. Internally a variable is represented as a memory location name.

Based on the value holding a variable are divide into two types.

Based on the position of declaration and based on the position all variables divide in three types.

Instance Variable

Static Variable

Local Variable

Advertisement here

Share this Page.