How many choices are possible when using a single if-else statement?
Control Structures in Java

Quiz
•
Computers
•
8th Grade
•
Hard
Adya Dalela
Used 86+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
1
2
3
4
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How many "else" statements can you pair with a single "if" statement
1
<10
<20
As many as is needed.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How many "else if" links can you have in an "if else if" ladder?
<10
<20
<30
As many as is needed to represent the situation
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Give the O/P.
int age= 5;
if (age > 6)
System.out.println("John is getting ice cream");
else
System.out.println("John is getting apple juice");
System.out.println("John is getting grapes);
John is getting ice cream
John is getting grapes
John is getting apple juice
John is getting grapes
John is getting apple juice
John is getting ice cream
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
if (income > 3000) {
System.out.println("Income is greater than 3000");
}
else if (income > 4000) {
System.out.println("Income is greater than 4000");
}
No output
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
"Can get a driver's license" if age is greater than or equal to 16.
Which of the following code is the best?
System.out.println("Cannot get a driver's license");
if (age >= 16)
System.out.println("Can get a driver's license");
System.out.println("Cannot get a driver's license");
else
System.out.println("Can get a driver's license");
System.out.println("Cannot get a driver's license");
else if (age >= 16)
System.out.println("Can get a driver's license");
System.out.println("Cannot get a driver's license");
else if (age > 16)
System.out.println("Can get a driver's license");
else if (age == 16)
System.out.println("Can get a driver's license");
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
double temperature = 50;
if (temperature >= 100)
System.out.println("too hot");
else if (temperature <= 40)
System.out.println("too cold");
else
System.out.println("just right");
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Week 3 Arduino Basics Quiz

Quiz
•
7th - 12th Grade
10 questions
Homework 5- Variables and selection

Quiz
•
8th Grade
15 questions
ICT Application - School Management System

Quiz
•
8th - 11th Grade
10 questions
Introduction to Arrays

Quiz
•
KG - University
10 questions
Creative Commons

Quiz
•
8th Grade
9 questions
Ethical Use of Digital Resources

Quiz
•
8th - 12th Grade
10 questions
Engineering: Systems of Communication

Quiz
•
6th - 8th Grade
9 questions
recupero informatica 3a liceo ballerini

Quiz
•
8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Computers
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
6 questions
Earth's energy budget and the greenhouse effect

Lesson
•
6th - 8th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade
20 questions
Lesson: Slope and Y-intercept from a graph

Quiz
•
8th Grade