Véletlenszerű számot generál Java Random osztály használatával.
Véletlen rand = új Véletlen ();
rand.nextInt (Math.abs ((firstChoice - secondChoice)) + 1) + Math.min (firstChoice, secondChoice);
A GitHub kódja: https://github.com/amandafarrell/RandomNumberGenerator