C H A P T E R  4

Operators

Java includes many operators, from ordinary mathematical operators such as a minus sign (−) to operators that only make sense for object-oriented programming, such as instanceof. To start with, let's look at the list of operators in Table 4-1.

images

images

Operator Precedence

The first thing to know about operators is that they have precedence. I can't forget Mr. Smith in junior high algebra class teaching us to memorize Please Excuse My Dear Aunt Sally. That odd phrase is an effective mnemonic for the order of operations (another ...

Get Java 7 for Absolute Beginners 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.