Rewrite the following using Ternary Operator: [2]
int age=30;
boolean res;
if(age<=20)
res=true;
else
res=false;
Answers
Answered by
2
Answer:
age<=20?res=true:res=false;
Similar questions
Business Studies,
5 months ago
Math,
5 months ago
English,
5 months ago
Math,
10 months ago
Social Sciences,
10 months ago
Math,
1 year ago
Chemistry,
1 year ago
Math,
1 year ago