**Two different big groups of data types -
Primitive and Non-Primitive
**Primitive Data Types
Basic data types that hold simple values (not objects)
Typ Number of bits/
e 10^(x) What it stores Example
byte 8 Small whole numbers byte a = 10;
shor 16 Whole number (just a bit more than a short b = 2000;
t byte)
int 32 Normal whole numbers int c = 50000;
long 64 Very large whole numbers long d =
1000000000L;
float 32 Decimal numbers float e = 5.5f;
dou 64 Decimal numbers (more precise) double f = 19.99;
ble
char 16 Single characters/letter char g = ‘A’;
bool JVM dependent True or False values boolean h = true;
ean
Non-Primitive Data Types
These are more complex. They store references (addresses) of objects, not the actual
value directly.
Examp
Type What it stores le
String words/text
Arrays list of things
Classes, Objects, Interfaces, Enums user-defined/custom types