Menu
Question Index
...


Arrange the following such that the a is false, b is true, c is 6 and d is 5 at the end of the program. Unselect any unwanted statements using the check box.

  • move         a = d > c ? e : d < c;
  • move         int c = 5, d = 15;
  • move         boolean a = true, b = false;
  • move         boolean e = d > c && b;
  • move         d = b ? d - 2 * c : --d;
  • move         c++;
  • move         b = d < c ? e : !a;
  • move         System.out.println(a + " " + b + " " + c + " " + d);

Doubts

Problems

Topic: Ternary Operator In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App