Core Java 1: Primitives & Memory Management Flashcards

(3 cards)

1
Q

Primitives

A

int, short, long, byte, char, boolean, float, double

byte (8-bit signed)
short (16-bit signed)
int (32-bit signed)
long (64-bit signed)

float (32-bit IEEE 754)
double (64-bit IEEE 754)

char (16-bit unsigned, UTF-16 code unit)

boolean (true/false, JVM dependent size)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Stack (RAM)

A

LIFO; place in RAM where local variables & method calls stored; literal values for primitive types stored & references to objects are also stored in stack; also used for executing threads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Heap (RAM)

A

used to store objects; a region of memory where all Java objects and arrays are allocated. String pools are also here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly