C H A P T E R 4
51
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.
Table 4-1. Java Operators
Category Operators
postfix expr++ expr--
unary ++expr --expr +expr -expr ~!
casting (type)
multiplicative * / %
additive + -
shift << >> >>>
relational < > <= >= instanceof
equality == !=
bitwise AND &
bitwise exclusive OR ^
bitwise inclusive OR |
logical AND &&
Java 7 for Absolute Beginners
© Jay Bryant 2012
J. Bryant,