CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the proper way to compare String values in Java?

Back

The .equals() String method

2.

FLASHCARD QUESTION

Front

Which Boolean expression will yield true after the code snippet executes? Options: str1 == str2 && str1 == str3, str1 != str2 && str1.equals(str3), str1 == str2 && str1.equals(str3), None of the above will evaluate to true after this code snippet executes.

Media Image

Back

str1 == str2 && str1.equals(str3)

3.

FLASHCARD QUESTION

Front

What does this Java expression evaluate to? 80 >= 80

Back

This expression will result in true.

4.

FLASHCARD QUESTION

Front

What is the difference between == and =?

Back

= is used for assignment, while == is used to check for equality.

5.

FLASHCARD QUESTION

Front

Why do we use if statements in Java?

Back

To do something only if a condition is true

6.

FLASHCARD QUESTION

Front

Which of the following statements is true?
Options: There can only be one else-if statement in an if-else if statement., An if-else if statement must always have an else clause., An if-else if statement cannot have an else clause., An if-else if statement must always start with an if statement.

Back

An if-else if statement must always start with an if statement.

7.

FLASHCARD QUESTION

Front

What does this Java expression evaluate to: true && !false

Back

true

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?