Review Questions

3.15 Which of the following expressions evaluates to true?

Select the two correct answers.

  1. (false | true)

  2. (null != null)

  3. (4 <= 4)

  4. (!true)

  5. (true & false)

3.16 Which statements are true?

Select the two correct answers.

  1. The remainder operator % can only be used with integral operands.

  2. Identifiers in Java are case insensitive.

  3. The arithmetic operators *, /, and % have the same level of precedence.

  4. A short value ranges from -128 to +127 inclusive.

  5. (+15) is a legal expression.

3.17 Which statements are true about the lines of output printed by the following program?
 public class BoolOp { static void op(boolean a, boolean b) { boolean c = a != ...

Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.