English

Which of the following is the correct precedence of logical operators? - Computer Applications

Advertisements
Advertisements

Question

Which of the following is the correct precedence of logical operators?

Options

  • !, &&, ||

  • &&, !, ||

  • ||, !, &&

  • &&, ||, !

MCQ

Solution

!, &&, ||

Explanation:

  1. ! (logical NOT) has the highest precedence.
  2. && (logical AND) comes next.
  3. || (logical OR) has the lowest precedence.
shaalaa.com
  Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 43]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.04 Operators in Java
EXERCISES | Q I. 1. | Page 43
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×