What will the following code segment print?
System.out.println(4 / 5);
Java Math
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Bob Powers
Used 56+ times
FREE Resource
15 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will the following code segment print?
System.out.println(4 / 5);
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will the following code segment print?
System.out.println(4 * 2.0);
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will the following code segment print?
System.out.println("b" + 2 * 2);
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will the following code segment print?
System.out.println(1 / 2.0);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value in variable x after this code segment is executed?
int x = 5.0 + 2;
7
7.0
There will be a runtime error
There will be a syntax error
5.02
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value in variable x after this code segment is executed?
String x = "" + 4 + 2;
"6"
"6.0"
There will be a runtime error
There will be a syntax error
"42"
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will the following code segment print?
System.out.println(17 % 3);
10 questions
AP CSA Unit 1 & 2 Review
Quiz
•
9th - 12th Grade
20 questions
Java Conditional Constructs
Quiz
•
9th - 10th Grade
15 questions
Topic 3 & 4 Practice - ArrayList and String Methods
Quiz
•
12th Grade
20 questions
APCSA Arrays
Quiz
•
9th - 12th Grade
10 questions
Computer Quiz(Java)(16-10-2020)
Quiz
•
9th Grade
16 questions
Loops Quiz
Quiz
•
9th - 12th Grade
16 questions
Java Conditional Statements
Quiz
•
9th Grade
16 questions
Loops
Quiz
•
5th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University