JAVA - How do I generate a random number that is weighted towards certain numbers? : <p>How do I generate a random number in Java, (using Eclipse) that is weighted towards certain numbers?</p>

<p>Example, I have 100 numbers, each can be equally chosen 1% of the time. However, if a certain number, lets say 5, is displayed 8 times in that 100, it now has an 8% chance to be randomly selected, while the other numbers are still at 1%. </p>

<p>How can I write a random generator that gives me 10 numbers and gives the number 5 that 8% advantage to show up?</p>

<p>Thanks and sorry if I did not explain that well.</p>
