Predict the output
Question 1
int c = (3<4)? 3*4 : 3+4;
Question 2
int a = 14, b = 4; boolean x = (a > b) ? true : false;
Question 3
int x = 90;
char c = (x<=90)? 'Z' : 'I';
Question 4
int a = 18; int b = 12;
boolean t = (a > 20 && b < 15)? true : false;
Question 5
c = (val + 550 < 1700)? 200: 400;
if: (a) val = 1000 (b) val =
1500
No comments:
Post a Comment