Java have two types of data types.
- Primitive Data Types
-
User Defined Data Types
Java is statically typed and also a strongly typed language : because we have to declare the type of each variable and one variable cannot store value of other type of variable. But languages like PHP, Python are dynamically typed because their variable can take any type of variable and we don’t have to tell the type of value a variable will store.
Primitive Data Types :
- byte – 1 Byte
- short – 2 Byte
- int – 4 Byte
- char – 2 Byte (Depends on encoding)
- float – 4 Byte
- double – 8 Byte
- Boolean – 1 Byte
- long (int java 8) – 8 Byte
More info on java Data types : Go Here and Here
Backup of above article : Go Here (1st) and Here(2nd)