import java.util.Random; // For the random Class class Random1 // This is named Random1 to avoid confusion with the existing class Random { public static void main (String [] args) { Random r1 = new Random(873469567); // Decalre and instantiate a new object of Random. //Intitialize with a particular seed. // The next 2 statements will always generate the same numbers when run. System.out.println(r1.nextInt()); // prints the next integer generated by the RNG (Random Number Generator) System.out.println(r1.nextDouble()); // prints the next double generated by the RNG Random r1 = new Random(); // Decalre and instantiate a new object of Random. //Intitialize with the current system time as the seed. // The next 2 statements will always generate different numbers when run. System.out.println(r1.nextInt()); System.out.println(r1.nextDouble()); } }