Advertisements
Advertisements
प्रश्न
Given: String st = (a>= 90)? "Excellent": "Best";
Predict the output, when a = 90.
विकल्प
Best
Excellent: Best
Best: Excellent
Excellent
MCQ
उत्तर
Excellent
Explanation:
Since condition (a>= 90) of the ternary operator is true, st is assigned the value of expression 1, i.e., excellent.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?