Chapter 2Operators and Statements

OCA exam objectives covered in this chapter:

  • correct Using Operators and Decision Constructs
    • Use Java operators; including parentheses to override operator precedence
    • Create if and if/else and ternary constructs
    • Use a switch statement
  • correct Using Loop Constructs
    • Create and use while loops
    • Create and use for loops including the enhanced for loop
    • Create and use do/while loops
    • Compare loop constructs
    • Use break and continue

Like many programming languages, Java is composed primarily of variables, operators, and statements ...

Get OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0-808 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.