
CodeHS 2.6 Booleans
Authored by Aaron Pavao
Computers
9th Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the possible values that a boolean variable can hold in Java?
0 and 1
true and false
yes and no
on and off
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a boolean variable in Java?
int flag = true;
boolean flag = 1;
boolean flag = true;
Boolean flag = "true";
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid boolean expression in Java?
5 > 3
"true" == true
1
None of the other answers are correct
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of a boolean variable in Java?
0
false
null
undefined
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can a boolean in Java be cast to any other data type?
Yes, to any type
Yes, but only to a string
No
Yes, but only to an integer
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to represent boolean values in conditional statements, such as if-else in Java?
int
double
boolean
void
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
A boolean ...
expresses a true/false statement.
can contain letters, numbers, spaces, and symbols
executes a true/false statement based on data entered.
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
10 questions
Списки Python + Pygame
Quiz
•
KG - University
12 questions
Artificial Intelligence
Quiz
•
9th Grade
10 questions
Contact Center Sevices
Quiz
•
7th - 10th Grade
10 questions
Women in Tech by Sisters of Code
Quiz
•
9th - 12th Grade
14 questions
Microsoft Excel Advanced Features
Quiz
•
1st Grade - University
10 questions
ICT 9 Bootstrap
Quiz
•
9th Grade
10 questions
ICT YR 9
Quiz
•
9th Grade
10 questions
GCSE Computer Science - Unit Sizes
Quiz
•
9th - 10th 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