Test: Jfo Section 3 Quiz 1 - L1-L2
Test: Jfo Section 3 Quiz 1 - L1-L2
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
(1) Points
intVal (*)
Hello
int
strVal (*)
String
Correct
(1) Points
String firstName = “Alex”; (*)
boolean age = 20;
double checkingAmount = 1500; (*)
int averageDollarAmount = 19.95;
Correct
(1) Points
String x = Java;
String “x” = Java;
String x= “Java”; (*)
String “x” = “Java”;
Correct
(1) Points
a (*)
int
Welcome
2
Correct
(1) Points
Variables will be ignored by compiler.
They make code more flexible. (*)
The value assigned to a variable may never change.
The allow code to be edited more efficiently. (*)
Correct
(1) Points
Hello World
World (*)
Hello
Hello
World
Correct
(1) Points
int a = 10; (*)
int a = “10”;
int a = 10
int a; a = 10; (*)
Correct
(1) Points
int (*)
float
String
short
Correct
(1) Points
+ (*)
– (*)
#
@
Correct
10. Which two are recommended practices for naming final variables?
Mark for Review
(1) Points
Capitalize every letter (*)
Separate words with an underscore (*)
Capitalize first letter
Separate words with an space
Correct
(1) Points
True (*)
False
Correct
(1) Points
const
final (*)
static
break
Incorrect. Refer to Section 3 Lesson 2.
(1) Points
–27 to 27–1 (*)
–215 to 215–1
–231 to 231–1
–263 to 263–1
Correct
(1) Points
Value of x is 0
Value of y is 1
Value of x is 100
Value of y is 1
Value of x is 100
Value of y is 1
Value of x is 100
Value of y is 101 (*)
Correct