MidTerm Flashcards
1
Q
Variable represented in
A
Unicode
2
Q
Variable Name
A
must start with a character, and can include any unicode character
3
Q
Two datatypes of Java
A
Primitive and Non-primitive
4
Q
Primitive examples
A
byte, short, long, int, float, double, boolean and char
5
Q
Non-primitive examples
A
String, Array, Classes
6
Q
byte size
A
1 byte; -2^7 to 2^7 where 7 = 8 - 1
7
Q
short size
A
2 byte; -2^15 to 2^15 where 15 = 2x8-1
8
Q
int size
A
4 byte; -2^31 to 2^31 where 31 = 4x8-1
9
Q
long size
A
8 byte; -2^(8x8-1) to 2^(8x8-1)
10
Q
char size
A
2 byte
11
Q
float
A
4 byte; 6 to 7 decimals
12
Q
double
A
8 byte; 15 decimals
13
Q
in Java, non-primitives are known as
A
reference types
14
Q
Shortcut If then else
A
exp ? true : false
15
Q
Strongly typed is
A
strict rule with data type conversion