4

Operators

CERTIFICATION OBJECTIVE

    •    Using Java Operators

    •    Use Parentheses to Override Operator Precedence

    •    Test Equality Between Strings and Other Objects Using == and equals()

    image  Two-Minute Drill

Q&A Self Test

If you’ve got variables, you’re going to modify them. You’ll increment them, add them together, and compare one to another (in about a dozen different ways). In this chapter, you’ll learn how to do all that in Java. For an added bonus, you’ll learn how to do things that you’ll probably never use in the real world, but that will almost certainly be on the exam.

CERTIFICATION OBJECTIVES

Java Operators (OCA ...

Get OCA/OCP Java SE 7 Programmer I & II Study Guide (Exams 1Z0-803 & 1Z0-804) 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.