Data types specify the size and type of values that can be stored. The variety of data types available allow the programmer to select the type appropriate to the needs of the application. Data type in Java can be classified as:
- Primitive types
- Reference types
Java has 8 primitive types: -
boolean
char
double
float
byte
int
short
long
Also Java has 3 reference types:
Class
Arrays
Interfaces