I need a function which generates me random numbers but where some numbers can appear more often then others.
Lets say i want random numbers from 1 to 10 where 2 and 3 have twice the chance to appear than the rest.
How can i do this in java? Haven`t found a function for this.
Aucun commentaire:
Enregistrer un commentaire