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 O’Reilly online learning.

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