
Java - If Else Switch
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
taha Rupawala
Used 15+ times
FREE Resource
Enhance your content in a minute
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What are the conditional statements in Java
else if
switch
if switch
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
PREDICT THE OUTPUT:
int x = 20;
int y = 18;
if(x>y)
{
System.out.println("x is greater than y");
}
else
{
System.out.println("Error");
System.out.println("Incorrect code");
}
Error
Incorrect code
x is greater than y
Error
Incorrect Code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
PREDICT THE OUTPUT:
int time = 16;
if(time > 12)
{
System.out.println("Good Afternoon");
}
else
{
System.out.println("Good night");
}
Good Night
Good night
Good Afternoon
Good afternoon
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
PREDICT THE OUTPUT:
int x = 60;
int y = 90;
if (y%x == 0 && y-x==30)
{
System.out.println("Hello World");
}
else
{
System.out.println("Error")
}
Hello World
Error
Hello world
Hello World
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
FILL IN THE BLANKS:
int x = 50;
int y = 10;
__ ( x__y)
{
System.out.println("Hello World");
}
if, <
else, >
if, >
if, %
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
FILL IN THE BLANK:
int x = 50;
int y = 50;
__(x__y)
{
System.out.println("1");
}
__(x>y)
{
System.out.println("2");
}
__
{
System.out.println("3");
}
if, ==, else if, else
else, %, if else if, else
else if, if, else, if
if, --, else if, else
Similar Resources on Wayground
9 questions
IT related jobs
Quiz
•
9th Grade
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
C3.5 - Video 6 - AI
Quiz
•
11th Grade
11 questions
Test evaluation word SP3S1
Quiz
•
12th Grade
8 questions
Basic computer
Quiz
•
9th - 12th Grade
10 questions
X UH 3 TIK
Quiz
•
10th Grade
10 questions
Grade 9 ICT- Lesson 2
Quiz
•
9th Grade
10 questions
Diagnoses and Identification of Faulty Computer and Network
Quiz
•
9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Computers
15 questions
Internet Vocabulary Notebook Check #2 - CTEA(2024)
Quiz
•
12th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
39 questions
UNIT 7 and UNIT 8 — Multiple Choice Question Bank (Extracted)
Quiz
•
9th Grade
50 questions
Money Matters Fall 2025 Final Exam — Worksheet Questions
Quiz
•
12th Grade
47 questions
CSF Final Exam Practice
Quiz
•
9th - 12th Grade
