Data Types
Java is strongly typed. This means that all types consist of a value and a type.
Types of Types
There are two different types of type in Java.
Primitive
int
,byte
,short
andlong
float
, anddouble
char
boolean
Composite
string
- Arrays e.g.
int[]
Literals
Literal values are the actual value of some type that occurs.
- 0 or 574489 are literals of type
int
true
andfalse
are literals of typeboolean