what is ternary operator
Answers
Answered by
5
Ternary operatires are also called conditional operator where u ask the computer if a statement or expression is satisfied and give two answers one for true and noe foe also falso
E.g.: String a=b>45? "True":"false"j;
So basically the computer displays the first sentence or word if true and the second if false .
Hope I helped u
If h didn't understand u can ask me
E.g.: String a=b>45? "True":"false"j;
So basically the computer displays the first sentence or word if true and the second if false .
Hope I helped u
If h didn't understand u can ask me
Answered by
14
The ternary operator is an operator that exists in a number of programming languages, which takes three operands rather than the typical one or two that most operators use.
Similar questions