Rewrite the following if else statement using ternary operator.
if(a>b)System.out.println(a*2);
else System.out.println(b*2);
Answers
Answered by
0
Answer:
if(a>b)?System.out.println(a*2); : System.out.println(b*2);
Similar questions