+ 1
can anyone assit me with the ? operator. I am not understanding its purpose and how it works. include an example please
4 Réponses
0
thank you @Andre I now have a better understanding
0
ok jus to finish on this problem, can I have an explanation of this block
int x = 3; int y = 8;
x = (y%x ! =0) x/y:y;
0
thank you @Andre
0
myString = myBool == true ? "true!" : "false!";
is the same as:
if (myBool == true)
myString = "true!";
else
myString = "false!";