Advertisements
Advertisements
प्रश्न
Explain the following with one example.
Ternary operator
थोडक्यात उत्तर
उत्तर
Ternary operators handle three operands. Conditional assignment refers to assigning values to variables based on logical expressions.
Example: Syntax:
variable = (test expression) ? Expression 1 : Expression2
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]