
3.1 INTRODUCTION
For performing different kinds of operations, various types of operators are required. An operator denotes
an operation to be performed on some data that generates some value. For example, a plus operator (1) on
3 and 4 generates 7 (3 1 4 5 7). Here, 3 and 4 are called operands.
Java is rich in built-in operators. The four main classes of operators are arithmetic, relational, logical
and bitwise.
Apart from these, there are many other operators. A list of operators provided by Java is given in Table 3.1.
Operator Symbolic Representation
Arithmetic 1, 2, /, *, %
Logical &&, ||, !
Relational ., ,, , 5, . 5, 5 5, !5
Assignment ...