state the output
char s= 'd';
int a=2;
a= (s=='D')? 'd' : 'D';
System .out.println(++a);
System.out.println(++s);
Answers
Answered by
2
It is a Ternary operator
In variable s 'd' character is assigned
Now it is checking if s equels d
So it is true then it will print d which value of ASCII value of d will be 68.
M
Similar questions
Chemistry,
4 months ago
Environmental Sciences,
4 months ago
History,
8 months ago
History,
8 months ago
Chemistry,
1 year ago