
CONDITIONALS
Authored by Zaid Muhammad
Computers
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of conditional statements in Java?
To declare variables
To execute a block of code only if a certain condition is true
To perform mathematical calculations
To define classes and objects
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a logical operator in Java?
++ (Increment)
&& (AND operator)
:: (Method reference)
$ (Dollar sign)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
int x =: 10;
int y = 20;
if (x > y || x<5) {
System.out.println("Condition is true");
} else {
System.out.println("Condition is false");
}
Condition is true
B) Condition is false
C) Compilation error
D) Runtime error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
int x = 5;
if (x > 0 && x < 10) {
System.out.println("Number is between 0 and 10");
} else {
System.out.println("Number is not between 0 and 10");
}
A) Number is between 0 and 10
B) Number is not between 0 and 10
C) Compilation error
D) Runtime error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
int i = 0;
while (i < 5) {
System.out.print(i + " ");
i += 2;
}
A) 0 1 2 3 4
B) 0 2 4
C) 2 4 6 8 10
D) Infinite loop
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Greater than or equal to
> or =
> || =
>=
<=
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What Javascript code matches this statement:
Their name is Kim and they are less than 16 years old
if (name = "Kim" && age < 16 )
if (name === "Kim" && age < 16 )
if (name = "Kim" || age < 16 )
if (name === "Kim" || age < 16 )
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Логические тесты 5-6 классы
Quiz
•
5th - 6th Grade
18 questions
EXA-DIAG-INF-III-AGO-2022
Quiz
•
11th Grade
20 questions
PENILAIAN HARIAN SISTEM KOMPUTER
Quiz
•
8th Grade
20 questions
Advantages and Disadvantages of Collecting Data
Quiz
•
10th Grade
20 questions
On-tap-chu-de-C
Quiz
•
6th Grade
20 questions
Vấn đề Môi trường 02
Quiz
•
Professional Development
20 questions
Control Structures C#
Quiz
•
University
20 questions
NP IT Quiz ปริศนาไอที #4
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade