KnowledgeBoat Logo

Computer Applications

If m, n, p are the three integers, then which of the following holds true, if (m == n) && (n != p)?

  1. 'm' and 'n' are equal
  2. 'n' and 'p' are equal
  3. 'm' and 'p' are equal
  4. none

Java Conditional Stmts

38 Likes

Answer

'm' and 'n' are equal

Reason — Assuming that the && operator results in 'true', we can conclude that both the conditions (m == n) and (n != p) are true. Hence, m and n are equal.

Answered By

29 Likes


Related Questions