
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
10 questions
ICT Java programming workshop
Quiz
•
9th Grade
10 questions
Паскаль. Основные команды
Quiz
•
8th - 11th Grade
10 questions
ระบบทางเทคโนโลยี ม.4
Quiz
•
10th Grade - University
10 questions
Excel
Quiz
•
10th - 11th Grade
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
10 questions
مراجعة الوحدة 3 ( البرمجة بواسطة المايكروبت )
Quiz
•
12th Grade
10 questions
Excel
Quiz
•
9th Grade
11 questions
BTEC DIT C3 B1 - Threats to Data
Quiz
•
11th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th 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
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
