
Help with instruction
I don´t understand this instruction, can someone help me? Which value will have sum?
player can take two values "0" or "X" which number returns?
(Im thinking that value will be between 2 and 2 more or less).
> int sum = player.equals("O") ? 2 : 2;

Are you asking what
Code:
int sum = player.equals("O") ? 2 : 2;
is?
If so, It's basically saying that if player is equal to "O", then set sum equal to negative two. If player does not equal "0", then set sum to positive two. I hope that helps.