Write a Difference Between Unary and Binary Operator.
Advertisements
Questions
Write a difference between unary and binary operator.
Distinguish between Unary & Binary arithmetic operator.
Distinguish Between
Advertisements
Solution
| S. No. | Unary Operators | Binary Operators |
| 1. | The operators which act upon a single operand are called unary operators. | The operators which require two operands for their action are called binary operators. |
| 2. | They are pre-increment and post increment. | They are mathematical operators and relational operators. |
| 3. | Example: x++; | Example: x = x + 1; |
shaalaa.com
Introduction of Operators in Java
Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 44]
