Java Conditions and If Statements

Quiz
•
Computers
•
10th Grade
•
Hard
Myra Ungriano
Used 15+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is not included in Java Conditional statements?
if
else
else if
switch
none
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which conditional statement is used to specify a block of code to be executed if a specified condition is false?
if
else
else if
switch
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to check if a variable 'x' is greater than 10 in Java?
if x > 10
if x >= 10
if x < 10
if x <= 10
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a comparison operator in Java?
==
<=
&&
!=
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When should you use the else if statement in Java?
To specify a block of code to be executed if a specified condition is true.
To specify many alternative blocks of code to be executed.
To specify a new condition to test, if the first condition is false.
To specify a block of code to be executed if the same condition is false.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for a switch statement in Java?
switch { }
switch (expression) { }
switch expression { }
switch (expression) { case: }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which conditional statement would you use to specify many alternative blocks of code to be executed?
if
else
else if
switch
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Estructuras Selectivas C++

Quiz
•
7th Grade - Professio...
7 questions
Review Materi

Quiz
•
9th - 12th Grade
12 questions
Pretest - Webinar1 Kelas Industri Hummasoft

Quiz
•
10th Grade
10 questions
Struktur Percabangan PHP

Quiz
•
2nd Grade - University
9 questions
Linguaggio C

Quiz
•
1st - 12th Grade
10 questions
Sentencias: IF, SWITCH y WHILE

Quiz
•
9th - 12th Grade
10 questions
OSI Model - Data Link Layer

Quiz
•
9th Grade - Professio...
12 questions
visual studio 2010

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade