The if-else statement will execute one group of statements if its boolean expression is true or another group if its boolean expression is false.

Comp Prog Chapter 4 Test - Java
Assessment
•
Charles Richter
•
Computers
•
9th - 12th Grade
•
5 plays
•
Medium
Student preview

25 questions
Show all answers
1.
MULTIPLE CHOICE
2 mins • 1 pt
2.
MULTIPLE CHOICE
2 mins • 1 pt
All it takes for an OR expression to be true is for one of the subexpressions to be true.
3.
MULTIPLE CHOICE
2 mins • 1 pt
All it takes for an AND expression to be true is for one of the subexpressions to be true.
4.
MULTIPLE CHOICE
2 mins • 1 pt
If the expression on the left side of the && operator is false, the expression on the right side will not be checked.
5.
MULTIPLE CHOICE
2 mins • 1 pt
A random number, created as an object of the Random class, is always an integer.
6.
MULTIPLE CHOICE
2 mins • 1 pt
In an if-else statement, if the boolean expression is false
7.
MULTIPLE CHOICE
2 mins • 1 pt
______ operators are used to determine whether specific relationships exists between two values.
8.
MULTIPLE CHOICE
2 mins • 1 pt
A block of code is enclosed in a set of
9.
MULTIPLE CHOICE
2 mins • 1 pt
The boolean expression in an if statement must evaluate to
10.
MULTIPLE CHOICE
2 mins • 1 pt
What will be the values of ans, x, and y after the following statements are executed? int ans = 35, x = 50, y = 50;
if (x >= y)
{ans = x + 10;x -= y;}
else
{ans = y + 10;y += x;}
Explore all questions with a free account
Similar Resources on Quizizz
21 questions
Синтаксис Python
•
7th - 11th Grade
20 questions
Python - Iteration (For Loops)
•
10th Grade
20 questions
Java Arrays
•
9th - 12th Grade
20 questions
Basics Python
•
8th - 10th Grade
20 questions
Java, part I
•
11th Grade - University
20 questions
AP CS A Unit 3 Review
•
11th - 12th Grade
25 questions
Library Classes
•
10th Grade
24 questions
CS A Unit 4 Practice
•
11th Grade
Popular Resources on Quizizz
17 questions
CAASPP Math Practice 3rd
•
3rd Grade
15 questions
Grade 3 Simulation Assessment 1
•
3rd Grade
20 questions
math review
•
4th Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2425sy
•
5th Grade
16 questions
Grade 3 Simulation Assessment 2
•
3rd Grade
21 questions
6th Grade Math CAASPP Practice
•
6th Grade
13 questions
Cinco de mayo
•
6th - 8th Grade
20 questions
Reading Comprehension
•
5th Grade