Computer Science, asked by shrutisharmajsr567, 6 months ago

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 siddharthasingh15
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

 \infty  \: \: please \: mark \: as \: brainlest \:  \infty

Similar questions