Ben Chuanlong Du's Blog

It is never too late to learn.

Generating Random Numbers in Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. The java.util.Random class provides a low-quallity generator suitable for "informal" uses of random numbers.

  2. It is suggested that you use the classs org.apache.commons.math3.random.RandomDataGenerator for generating random numbers if quality is of a concern. Please refer to Summary on Random Number Generators for more details.

Comments