Chapter 3
Using Java Operators and Conditional Logic
The fundamental unit of work in a Java program is the statement. To write useful statements, you must learn how to operate on your data. To write accurate statements, you must also learn the rules of the operation themselves. There is no substitute for understanding Java’s operators very well. Your primary reward is a big one: You’ll spend less time getting your code to do the right thing. Once your statements evaluate correctly, you’ll need to test them and make sure all the decisions based on those statements evaluate as they should.
In this chapter, we’ll cover the following topics:
- Using Java operators
- Using parentheses to control operators
- Understanding object equality
- Using if and ...
Get Java SE 7 Programming Essentials 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.