मराठी

Given: String st = (a>= 90)? "Excellent": "Best"; Predict the output, when a = 90. - Computer Applications

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.04: Operators in Java - EXERCISES [पृष्ठ ४३]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.04 Operators in Java
EXERCISES | Q I. 3. | पृष्ठ ४३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×