

Conditionals Test Review
Flashcard
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which keyword is used to execute code only if a condition is true? Options: if, else, while, for
Back
if
2.
FLASHCARD QUESTION
Front
Which statement will be executed if the condition in an if statement is false? Options: The if block, The else block (if provided), The program will stop, The code will execute regardless of the condition
Back
The else block (if provided)
3.
FLASHCARD QUESTION
Front
How do you write a condition to check if a variable x is equal to 5? Options: x == 5, x = 5, x === 5, x != 5
Back
x == 5
4.
FLASHCARD QUESTION
Front
How do you write a condition to check if a variable x is not equal to 5?
Back
x != 5
5.
FLASHCARD QUESTION
Front
What is the AND operator in Java?
Back
&&
6.
FLASHCARD QUESTION
Front
What is the OR operator in Java?
Back
||
7.
FLASHCARD QUESTION
Front
What will be the output of the following code?
int a = 1;
if (a > 3) {
println("Greater than 3");
} else {
println("Not greater than 3");
}
Back
Not greater than 3
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?