Mega Code Archive

 
Categories / Java Book / 001 Language Basics
 

0024 Operators

Java operators can be divided into the following four groups: arithmetic, bitwise, relational, logical. Operators are classified as prefix, postfix, and infix. A prefix operator is a unary operator that precedes its operand, for example -6. A postfix operator is a unary operator that trails its operand, for example x++. An infix operator is a binary or ternary operator that is placed between the binary operator's two or the ternary operator's three operands, for example x + 5.