Operator
- It is a special symbol which is used to perform logical or mathematical operation on data or variable.
Operand
- It is a data or variable on which the operation is to be performed.
Types of Operator
- ⇒Arithmetic Operators
- ⇒Relational Operators
- ⇒Logical Operators
- ⇒Assignment Operators
- ⇒Increment/Decrement Operators
Arithmetic Operators
Arithmetic operators are
used to perform arithmetic operations on variables and data.
|
Symbol |
Operation |
Example |
|
+ |
Addition |
x+y |
|
- |
Subtraction |
x-y |
|
* |
Multiplication |
x*y |
|
/ |
Division |
x/y |
|
% |
Modulus |
x%y |
Relational Operators
Relational Operators in Java are used to compare two variables for equality, non-equality, greater than, less than, etc. Java relational operator always returns a boolean value – true or false.
Logical
operators are used to check whether
an expression is true or false . They are used in decision making.

0 Comments