Skip to Main Content
Java 6 Illuminated: An Active Learning Approach, 2nd Edition
book

Java 6 Illuminated: An Active Learning Approach, 2nd Edition

by Julie Anderson, Herve J. Franceschi
February 2008
Intermediate to advanced content levelIntermediate to advanced
1288 pages
39h 39m
English
Jones & Bartlett Learning
Content preview from Java 6 Illuminated: An Active Learning Approach, 2nd Edition
2.4 Expressions and Arithmetic Operators 67
with the operators in each row. When two or more operators on the same
level appear in the same expression, the order of evaluation is left to right,
except for the assignment operator, which is evaluated right to left.
As we introduce more operators, we’ll add them to the Order of Precedence
chart. The complete chart is provided in Appendix B.
Using Table 2.11 as a guide, let’s recalculate the number of pennies:
int pennies = 2 * 25 + 3 * 10 + 2 * 5;
= 50 + 30 + 10
= 90
As you can see, 90 is the correct number of pennies in two quarters, three
dimes, and two nickels.
We also could have used parentheses to clearly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour
Java Illuminated, 4th Edition

Java Illuminated, 4th Edition

Julie Anderson, Hervé J. Franceschi

Publisher Resources

ISBN: 9780763749637