Quiz

The following questions will see what condition you're in after studying conditional statements in Java.

Questions

1:

Conditional tests result in either a true or false value. Which variable type does this remind you of?

  1. None. Stop pestering me with all of these questions.
  2. The long variable type.
  3. The boolean type.
2:

Which statement is used as a catch-all category in a switch block statement?

  1. default
  2. otherwise
  3. onTheOtherHand
3:

What's a conditional?

  1. The thing that repairs messy split ends and tangles after you shampoo.
  2. Something in a program that tests whether a condition is true or false.
  3. The place where you confess your sins to a neighborhood religious figure.

Answers

A1:

c. The boolean variable type can only equal TRue or false, making it similar to conditional tests. If you answered a., I'm sorry, but there's only 17 hours left and we've got a lot left to cover. Java doesn't teach itself.

A2:

a. default statements will be handled if none of the other case statements matches the switch variable.

A3:

b. The other answers describe conditioner and a confessional.

      
Comments