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
Java provides a rich set of operators they are divided
as follows
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
These operators are used check relation between the
two operands
Operator Description
<
>
<=
>=
==
!=
These operators are used to combine more than one
condition
Operator Description
&&
||
!
These operators are used to perform bit level
operations
Operator Description
&
|
^
<<
>>

Java Operators.ppt

  • 2.
    An operator isa 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
  • 3.
    Java provides arich set of operators they are divided as follows
  • 4.
    These operators areused 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
  • 5.
    These operators areused check relation between the two operands Operator Description < > <= >= == !=
  • 6.
    These operators areused to combine more than one condition Operator Description && || !
  • 7.
    These operators areused to perform bit level operations Operator Description & | ^ << >>