Can you tell me what the "?" mark is in this code (i.e. what its called)
Random rand = new Random();
int choice = (rand.nextInt(100)<75) ? 1:0;
When the code is run it returns either 1 or 0.
It returns 1 75% of the time.
I have played with the 1:0 values if you change it to 5:10 for example it returns the number 5, 75% of the time.
I want to understand what the ? is doing. I get that it some how identifies that of the two values it returns the first one 75% more than the second one.
And if you change the 75 to 25 it would then return the first value (1) 25% of the time vs. second value.
But I can't find any documentation on the ? or what other options I could use in place of it.
Thanks

