I want to generate random numbers in java, I know I should use existing methods like Math.random(), however, my question is: how can I generate the same sequence of numbers,
You need to seed the random number generator.
Random random = new Random(aFixedNumber); random.nextInt(); // will always be the same