IT 114: Introduction to Java
Answers to Class 14 Ungraded Quiz

  1. What kind of values do logical operators work on?
    boolean
  2. What is the data type of the result of using a logical operator?
    boolean
  3. What are the symbols for the logical AND operator?
    &&
  4. What are the symbols for the logical OR operator?
    ||
  5. What is the symbol for the logical NOT operator?
    !
  6. If the first operand given used with the logical AND operator is false, what must the value of the entire expression be?
    false
  7. If the first operand given used with the logical OR operator is true, what must the value of the entire expression be?
    true
  8. When does a while loop stop?
    when the boolean expression in the header becomes false
  9. When is the boolean expression evaluated in a do/while loop evaluated?
    after the first pass through the loop
  10. What keys do you press on a Unix machine if your code goes into an infinite loop?
    Control C