// Helene Martin, CSE 142 // Demonstrates use of a Random object import java.util.*; public class RandomDemo { public static void main(String[] args) { Random rand = new Random(); int myRand = rand.nextInt(10); System.out.println(myRand); // A random number between 1 and 47 inclusive? int rand1 = rand.nextInt(47) + 1; // A random number between 23 and 30 inclusive? int rand2 = rand.nextInt(8) + 23; // A random even number between 4 and 12 inclusive? int rand3 = rand.nextInt(5) * 2 + 4; } }