Java Operators

Java's operators originated in C and C++. If you are a C or C++ programmer, I have good news and bad news. The good news is that many of Java's operators have the same behavior as they do in C and C++. The bad news is that some do not, and those can trip you up on the exam. It is not assumed that you have a background in C or C++, but you should be far enough in your Java programming that most of the operators in Table 3.1 are familiar to you. Take the time now to go through the table and check off the ones with which you are familiar. Then highlight the ones that you need to study. Pay careful attention to these operators when you work your way through this chapter.

Table 3.1. Operator Summary
Category`OperatorExampleResult
Arithmetic ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams 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.