h. Rewrite the following if...else using ternary operator if(
m> 20) System.out.println("Yes"); else
System.out.println("No"); *
Answers
Answered by
0
Answer:
m > 20 ? System.out.println("YES") : System.out.println("NO") ;
If the condition before question mark is true, the statement before colon gets executed otherwise if false, the statement after the colon gets executed.
Similar questions