U2: Data Types Flashcards
1
Q
Primitive Data Types
A
byte; short; int; long; float; double; char; boolean
1
Q
Categories of Primitive Data
A
- Integers: byte; short; int; long
- Decimals: float and double
- Others: char and boolean
2
Q
short
A
- 16-bit signed two’s complement integer
- Range: -32,768 to 32,767
3
Q
byte
A
- 8 bit signed two’s complement integer
- Range: -128 to 127
4
Q
int
A
- 32-bit signed two’s complement integer
- Range: -2,747,483,648 to 2,747,483,647
5
Q
long
A
- 64-bit signed two’s complement integer
- Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
6
Q
float
A
- 32-bit IEEE 754 floating point
- Range: -3.4 x 10^38 to 3.4 x 10^38
7
Q
double
A
- 64-bit IEEE 754 floating point
- Range: -1.7 x 10^308 to 1.7 x 10^308
8
Q
char
A
- single 16-bit Unicode character
- Range: 0 - 65,565
9
Q
boolean
A
True or False
10
Q
Categories of Data in Java
A
- Primitives
- Objects (customized data type created from Classes)