what is ternary operator in JAVA... please don't answer from google..if u don't know don't answer..
Answers
Answered by
1
Answer:
In JAVA, Ternery operator is used to evaluate the Boolean expressions. It can be used to replace simple if...else statements. It is also called as shorthand for an if-then-else statement. It makes the code more readable.It is the only conditional operator that takes three operands. Hence, it is called Ternery Operator.
The first operand in java ternary operator should be a boolean or a statement with boolean result. If the first operand is true then java ternary operator returns second operand else it returns third operand.
Syntax- variable x = (expression) ? value if true: value if false.
ex- x = (y = = 10) ? 20:30
Answered by
1
Answer:
okkk
Explanation:
Congratulations..For the New Batch.
Similar questions
Economy,
3 months ago
English,
3 months ago
English,
6 months ago
Math,
6 months ago
Computer Science,
10 months ago