Operators In Java
The word “operation” refers to calculating a value using operands(like values or expressions)and a math operator.
The broad category of operators defined in java can be classified into :
- Logical Operators
- Bit-wise Operators
- Arithmetic Operators
- Relational Operators
Below image depicts the same :
Apart from the above there are some extra operators which are used to handle special operations/situations.
First let us focus on the above four categories.
Arithmetic Operators : We all must have been studied algebra during our school times. Arithmetic operators are used in arithmetical operations.
Bit-wise Operators : These operators works on the individual bits of the operands and can be applied on long,int,short,byte and char .
Relational Operators : They define equality and ordering . The outcome of these will be a boolean value .Usually used in If statements and other looping statements.
Logical Operators : They work on the boolean operands .Used to control the flow of execution.
Thanks for reading!
Rahul