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

Quiz
•
Computers
•
8th Grade
•
Hard
Adya Dalela
Used 83+ 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
12 questions
Operating System (OS) and Graphical User Interface(GUI)

Quiz
•
8th Grade
10 questions
Programming in Java

Quiz
•
8th Grade
10 questions
Java Math

Quiz
•
1st - 12th Grade
12 questions
Creative Commons

Quiz
•
7th - 9th Grade
11 questions
Creative Commons Logos

Quiz
•
7th - 8th Grade
10 questions
Types of software

Quiz
•
8th Grade
10 questions
Java Quiz 1: Introduction

Quiz
•
6th - 12th Grade
10 questions
Programming Quiz 2024/2025

Quiz
•
6th - 8th Grade
Popular Resources on Quizizz
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
Discover more resources for Computers
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade