Java – Variable Java variables are piece of memory that can store data values. A variable is assigned with a data type.