What is random seed about?
问题 For example the code below. It has a random class. However it always produce the same output everywhere . In this case which item is the seed? source: link import java.util.Random; public class RandomTest { public static void main(String[] s) { Random rnd1 = new Random(42); Random rnd2 = new Random(42); System.out.println(rnd1.nextInt(100)+" - "+rnd2.nextInt(100)); System.out.println(rnd1.nextInt()+" - "+rnd2.nextInt()); System.out.println(rnd1.nextDouble()+" - "+rnd2.nextDouble()); System