// random numbers2: generating pseudo-random numbers in java // This time, we will obtain numbers within a specific range public class random_numbers2 { public static void main(String[] args) { int random_num; // Note: Math.random() returns a double in the range of 0 to 1.0 // so this will give us a range random_num = 1 + (int) (Math.random() * 6); System.out.println("Result: " + random_num); System.exit (0); } }