int no1=10, no2=20;
int res = no1 + no2; // '+' & '=' are operators and no1 and no2 are operands
Below is the list of all operators present in Java :-
| Category | Description | Examples | Programs |
|---|---|---|---|
| Arithmetic Operators | Perform basic mathematical operations. |
|
Arithmetic Operators Explanation & Program |
| Assignment Operators | Assign values to variables. |
|
Assignment Operators Explanation & Program |
| Relational Operators | Compare two values and return a boolean result. |
|
Relational Operators Explanation & Program |
| Logical Operators | Perform logical operations on boolean expressions. |
|
Logical Operators Explanation & Program |
| Ternary Operator | A shorthand for an if-else condition. |
|
Ternary Operator Explanation & Program |
| Unary Operators | Operate on a single operand. |
|
Unary Operators Explanation & Program |
| Bitwise Operators | Operate on binary representations of integers. |
|
Bitwise Operators Explanation & Program |
| Shift Operators | Shift the bits of a number to the left or right. |
|
Shift Operators Explanation & Program |
| Instanceof Operator | Checks whether an object is an instance of a specific class or subclass. |
|
Instanceof Operators Explanation & Program |
Your feedback helps us grow! If there's anything we can fix or improve, please let us know.
Weβre here to make our tutorials better based on your thoughts and suggestions.