CodeHS 2.6 Booleans

CodeHS 2.6 Booleans

9th Grade

10 Qs

quiz-placeholder

Similar activities

Programming - Data Types

Programming - Data Types

1st - 10th Grade

10 Qs

CMU CS Academy Unit 3.2.1 Boolean Expressions Part 0

CMU CS Academy Unit 3.2.1 Boolean Expressions Part 0

9th Grade

15 Qs

java variables 1

java variables 1

9th - 12th Grade

13 Qs

Unit 1. Introduction to Object-Oriented Programming Concepts

Unit 1. Introduction to Object-Oriented Programming Concepts

9th - 10th Grade

15 Qs

Programming - Basic File Handling Operations

Programming - Basic File Handling Operations

3rd - 11th Grade

10 Qs

Logic, Binary & Boolean#1

Logic, Binary & Boolean#1

8th - 9th Grade

15 Qs

Javascript

Javascript

KG - Professional Development

13 Qs

CodeHS: Unit 6 - JavaScript Basics

CodeHS: Unit 6 - JavaScript Basics

9th Grade

15 Qs

CodeHS 2.6 Booleans

CodeHS 2.6 Booleans

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Aaron Pavao

Used 3+ times

FREE Resource

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 above

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.
takes in an input, does something with it, and then returns an output.

Runs a true/false statement based on data entered

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?