Data Types and Variables
Variable in Java is a data container that stores the data values during Java program execution. Every variable is assigned a data type, which designates the type and quantity of values it can hold. Variable is a memory location name of the data. The Java variables have mainly three types: Local, Instance and Static.
Data Types are divided into two group -
- Primitive - byte,short,int,long,float,double,boolean and char
- Non-Primitive - String, Arrays and Classes
Visit the following resources to learn more: