Professional Documents
Culture Documents
(1) Points
Value of x is 0
Value of y is 1
m
Value of x is 100
er as
Value of y is 1
co
eH w
Value of x is 100
Value of y is 1
o.
Value of x is 100
rs e
ou urc
Value of y is 101 (*)
Correct
o
value of x by 1?
vi y re
(1) Points
ed d
x = x +1;(*)
ar stu
x = +1;
x+;
is
x++;(*)
x += 1;(*)
Th
Correct
(1) Points
2
4
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
6
7
8 (*)
Correct
(1) Points
const
final (*)
static
break
m
er as
Correct
co
eH w
5. Which of the following data types is the largest?
o.
Mark for Review
rs e
ou urc
(1) Points
byte
o
short
aC s
int
vi y re
long (*)
Correct
6. What is the output?
ed d
ar stu
(1) Points
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
Value of age: 20
Value of age: 8
Value of age: 10 (*)
Value of age: 20
Value of age: 28
Value of age: 38
Value of age: 20
Value of age: 208
Value of age: 20810
Value of age: 20
Value of age: 8
Value of age: 9
Correct
m
er as
7. What value is assigned to x?
co
eH w
int x = 25 - 5 * 4 / 2 - 10 + 4;
o.
Mark for Review
rs e
ou urc
(1) Points
8
9 (*)
o
34
aC s
vi y re
7
Correct
ed d
(1) Points
is
int (*)
float
Th
String
short
sh
Correct
9. Java is a strongly typed language; therefore you must declare a data type
for all variables.
Mark for Review
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
(1) Points
True (*)
False
Correct
(1) Points
double salary = 20000.34;
int age=20;
m
double double=10;(*)
er as
int break=10;(*)
co
eH w
Correct
o.
11. Identify the names of two variables used in the given code.
rs e
ou urc
public class Variables {
public static void main(String args[]) {
String strVal = "Hello";
o
int intVal = 0;
aC s
}
}
Mark for Review
ed d
(1) Points
ar stu
strVal(*)
String
is
int
Th
Hello
intVal(*)
Correct
sh
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
str = ”World”;
System.out.println(str);
}
}
Mark for Review
(1) Points
Hello
Hello
World
World (*)
Hello World
Correct
m
er as
13. Which of the following two statements are true about variables?
co
Mark for Review
eH w
o.
(1) Points
rs e
They make code more flexible.(*)
ou urc
Variables will be ignored by compiler.
Correct
vi y re
(1) Points
double doubleVar1, double doubleVar2 = 3.1;
15. Which two data types are appropriate for their variable?
Mark for Review
(1) Points
String firstName = “Alex”;(*)
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
double checkingAmount = 1500;(*)
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
Th
sh
This study source was downloaded by 100000815348412 from CourseHero.com on 07-28-2021 21:41:20 GMT -05:00
https://www.coursehero.com/file/68385896/JFo-Section-3-Quiz-1-L1-L2docx/
Powered by TCPDF (www.tcpdf.org)