I want to create an array of object which the 40% of the array length should be object x ,the other 30% object z and 30% object y.
so i generate random number for array length

```
int numb = 10 + (int) (Math.random() * 20);

```

for example if the random number is 10 the array length will be 10 and from that 10 i want the 4 elements be object x the other 3 element be object z and the other 3 element object y.How can i do that?

thanks for your time 
sorry for bad english