What is the most elegant way to do the next stuff:
int i = oneOrZero; if (i == 0) { i = 1; } else { i = 0; }
You can assume that
i = (i == 0)?1:0 is one way, though I like @Jimmy's and @Yuval's versions better.
i = (i == 0)?1:0