Sams Teach Yourself Java 2 in 24 Hours

Sams Teach Yourself Java 2 in 24 Hours

By Rogers Cadenhead

Quiz

Test your knowledge of variables, expressions, and the rest of the information in this hour by answering the following questions.

Questions

  1. What do you call a group of statements that is contained with an opening bracket and a closing bracket?
    1. A block statement
    2. Groupware
    3. Bracketed statements
  2. A boolean variable is used to store true or false values.
    1. True
    2. False
    3. No, thanks. I already ate.
  3. What characters cannot be used to start a variable name?
    1. A dollar sign
    2. Two forward slash marks (//)
    3. A letter

Answers

  1. a. The grouped statements are called a block statement, or a block.
  2. a. true and false are the only answers a boolean variable can store.
  3. b. Variables can start with a letter, a dollar sign ($), or an underscore character (_).

Share ThisShare This

Informit Network