What are ternary operators?
Advertisements
प्रश्न
What are ternary operators?
लघु उत्तरीय
Advertisements
उत्तर
The Ternary Operator (?:) in Java is a conditional operator that operates on three operands. It is used to evaluate a condition and select one of two values based on whether the condition is true or false. It provides a shorter and simpler alternative to an if-else statement.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - EXERCISE [पृष्ठ १३१]
