Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

Workshop 93

The bowler-wearing detectives were physically indistinguishable except
for a minor difference in the shape of their mustaches. Despite being
terrible at their jobs,they were inexplicably assigned to important and
sensitive missions. They often pursued Tintin for crimes that he did not
commit.
As their names would indicate,the detectives were not related either.

Workshop


The followingquestions see what condition you’re in after studying condi-
tional statements in Java.


Quiz



  1. Conditional tests result in either a trueorfalsevalue. Which variable
    type does this remind you of?
    A. None. Stop pestering me with all these questions.
    B. Thelongvariable type.
    C. Thebooleantype.

  2. Which statement is used as a catch-all category in a switchblock
    statement?
    A. default
    B. otherwise
    C. onTheOtherHand

  3. What’s a conditional?
    A. The thing that repairs messy split ends and tangles after you
    shampoo.
    B. Something in a program that tests whether a condition is true or
    false.
    C. The place where you confess your sins to a religious authority
    figure.

Free download pdf