•    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.


Java Operators (OCA ...

Get OCA/OCP Java SE 7 Programmer I & II Study Guide (Exams 1Z0-803 & 1Z0-804) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.