public static void main(String[] args) {
String [] x = { "a", "b", "c"};
Double [] y = {0.23, 0.27, 0.5};
Random rand = new Random();
Double number = rand.nextDouble();
int Index = 0;
for (int i = 0; i < y.length; i++)
{
if (number <= y[i])
{
Index = i;
break;
}
y[i + 1] += y[i];
}
System.out.println(x[Index]);
}
}
спасибо Кандрашкину Алексею!