Operators In Java Programming By Rajanikanth B
Introduction An operator is a symbol which is used to perform some operation in a program For example + is a operator which is used to perform mathematical addition and string concatination operation
Types of Operators 1. Arithmetic Operators 2. Relational Operators Java provides a rich set of operators they are divided as follows 1. Arithmetic Operators 2. Relational Operators 3. Bitwise Operators 4. Logical Operators 5. Assignment Operators 6. Misc Operators
Arithmetic Operators These operators are used to perform mathematical operations. Operator Description + Adds two operands - Subtracts second operand from first * Multiply two operands / Divide numerator by denumerator % Gives remainder of division ++ Increments value by ONE -- Decrements value by ONE
Relational Operators These operators are used check relation between the two operands Operator Description < > <= >= == !=
Logical Operators These operators are used to combine more than one condition Operator Description && || !
Bitwise Operators These operators are used to perform bit level operations Operator Description & | ^ << >>