I have the following code:
public void onFinish() {
int num;
String outCome = "";
for (int ii = 0; ii < 10; ii++) {
num = (int) (Math.random() * 100) % 3;
switch (num) {
case 0:
outCome = "ountcome1";
break;
case 1:
outCome = "outcome2";
break;
case 2:
outCome = "outcome3";
break;
}
text.setText(outCome);
What I'm trying to accomplish is that case 0 has a %50 chance to happen, while case 1 and 2 have %25 chance.
Thanks in advance!