Building Blocks of Code Flashcards
1
Q
Variables must have two things, what are they?
A
All variables must have a name and a data type.
2
Q
In the statement below, which is the variable name?
String myContainer = ‘Leftovers from Monday’’;
A
myContainer
3
Q
If Integer i = 44, what is the value of the result variable in the following statement?
Boolean result = i < 20;
a. True
b. 44
c. False
d. 20
A
c. False
4
Q
How many choices are possible when using one if-else statement?
a. 1
b. 2
c. 0
d. A and B
A
b. 2