Question 63

Computer Awareness Stacks Medium

Which operator is having the highest precedence?

(A) Postfix
(B) Unary
(C) Shift
(D) Equality
View Dynamic Solution & Explanation
Correct Solution: Option A

Step-by-step Solution:

In Java and most programming languages, operator precedence determines the order in which operators are evaluated in expressions. Let's analyze the options: 1. Postfix Operators: Examples: `a++`, `a--`. These operators have the highest precedence among all operators. They are evaluated after their operand but before other operations.\[\] 2. Unary Operators: Examples: `++a`, `--a`, `!`. These have a lower precedence than postfix operators but are still higher than many other operations.\[\] 3. Shift Operators: Examples: `<<`, `>>`, `>>>`. They have a lower precedence than both postfix and unary operators.\[\] 4. Equality Operators: Examples: `==`, `!=`. These have the lowest precedence compared to the other listed options.\[\] \[\] Correct Answer: (a)