ITEC 1030 Intro to programming Week 2
· Question 1
When data cannot be changed after a class is complied, the data is _____.
· Question 2
Which of the following is not a primitive data type in Java?
· Question 3
Which of the following elements is not required in a variable declaration?
· Question 4
The assignment operator in Java is _____.
· Question 5
Assuming you have declared shoeSize to be a variable of type int, which of the following is valid assignment statement in Java?
· Question 6
Which of the following data types can store a value in the least amount of memory?
· Question 7
A boolean variable can hold __.
· Question 8
The value 137.68 can be held by a variable of type _____.
· Question 9
An escape sequence always begins with a(n) _____.
· Question 10
Which Java statement produces the following output?
w
xyz
· Question 11
The remainder operator _____.
· Question 12
Consider the arithmetic statement (4*5-19)*2+7. According to the rules of operator precedence, which of the following calculations would take place first?
· Question 13
The “equal to” relational operator is _____.
· Question 14
When you perform arithmetic with values of diverse types, Java _____.
· Question 15
If you attempt to add a float, an int, and a byte, the result will be a(n) _____.
· Question 16
You use a _____ to explicitly override an implicit type.
· Question 17
In Java, what is the value of 3 + 7 * 4 + 2?
· Question 18
Which assignment is correct in Java?
· Question 19
Which assignment is correct in Java?
· Question 20
What is the numeric value of each of the following expressions as evaluated by Java?
i. 4 + 6 * 3 [i____]
a. 30 b. 22 c. 18 d. 20
ii. 6 / 3 * 7 [ii___]
a. 21 b. 6/21 c. 0 d. 14
iii. 18 / 2 + 14 / 3 [iii__]
a. 7 b. 0 c. 1 d. 13
iv. 16 / 2 [iv___]
a. 14 b. 8 c. 6 d. 0
v. 17 / 2 [v____]
a. 8.5 b. 8 c. 1 d. 5
vi. 28 / 5 [vi___]
a. 5.6 b. 6 c. 3 d. 5
vii. 16 % 2 [vii__]
a. 14 b. 8 c. 6 d. 0
viii. 17 % 2 [viii_]
a. 8.5 b. 8 c. 1 d. 5
Note: For questions ix–xii, please insert the answers to ix and x in x's field and do the same for xi and xii. This is merely due to a limitation of the Quiz's capabilities and holds no significance for the material. Please separate the answer with a simple comma, like this: 5, 5 or a, b
ix. 28 % 5
a. 5.6 b. 6 c. 3 d. 5
x. 28 % 5 * 3 + 1 [x____]
a. 10 b. 14 c. 8 d. 13
xi. (2 + 3) * 4
a. 24 b. 20 c. 14 d. 20
xii. 20 / (4 + 1) [xii__]
a. 0 b. 5 c. 4 d. 2
· Question 21
Which assignment is correct in Java?
ITEC 1030-Intro to programming- Week 2
Question 1 When data cann...
A+ - Thank you!
Thanks for the positive feedback!