KnowledgeBoat Logo

Computer Science

Given is a program snippet:

{
if(a != b)
c = a;
else
c = b;
}

It can be stated as:

  1. c = (a == b) ? a : b;
  2. c = (a != b) ? a : b;
  3. c = (a != b) ? b : a;
  4. none

Java Conditional Stmts

1 Like

Answer

c = (a != b) ? a : b;

Answered By

1 Like


Related Questions