What is c>a?1:0 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

What is c>a?1:0

int a = 4; int b = 1; int c = ++a + - -b; System.out.println(c>a?1:0); Can someone explain why this is 0 and not 1? I thought c = 5 which means that c>a is true and the first statement is executed. What am I missing?

3rd Jan 2019, 10:24 PM
0 Answers