Output Questions for Class 10 ICSE Computer Applications
Predict the output of the below Java program snippet:
int x = 90;
char c = (x<=90)?'Z':'I';
Java
Java Operators
25 Likes
Answer
Z
Working
As value of x is 90 so condition of ternary operator is true. Variable c is assigned the value of expression 1 which is Z.
Answered By
12 Likes