Possible Duplicate:
Why would you use the ternary operator without assigning a value for the “true” condition (x = x ?: 1)
In one's book I saw the vague (for me) syntax of ternary operator usage:
int nr = nr ? : 1; /* allowed shortcut, same as "nr ? nr : 1" */
What exactly this mean? Somewhere in the code the 'nr' variable is declared and it's initial value is based on the comparison result whether the 'nr' (which has a junk inside it, I guess O_o) is not equal to zero... And if so then what value it would get?