Chapter 7. Operators

DO OR DIE

  • Tumble over ice

  • Add twist

  • Serve

Operators are used in Java more or less as you would expect. Let's face it, operators are stoopid boring, mostly obvious, and 90% intuitive. But the section 23A of the Law of Tech Book Writing states that all programming authors must talk about operators. Okay. I'll make you a deal. We'll play nice, and deal with operators, and just get it over with as painlessly as possible.

Java features operators for arithmetic, incrementing and decrementing, logical operations, and bitwise operations. First, let's take care of the unpleasant business of operator precedence.

Get Java Garage 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.