3. Using Operators and Decision Constructs


  • there is overlap between topics, which is unavoidable due to the organisation of the objectives
  • Touched on topics are introduced, but covered in other sections in much greater detail

Use Java operators; including parentheses to override operator precedence


  • operators, operands and expressions
  • arithmetic operators and operator predecence
  • String concatenation using +
  • Promoting operands
  • increment and decrement
  • Shift operators
  • Comparison operators
  • Logical operators, including short-circuited
  • Assignment operators
  • Other operators

Test equality between Strings and other objects using == and equals ()


  • String literals vs String objects
  • Which objects implement equals(), and those that only provide reference equality

Create if and if/else and ternary constructs


  • if/else if/else if/else
  • ternary operator

Use a switch statement


  • Supported data types and values
  • case, break and default
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License