/********************************************************************* * Author: Eric Heim * Date Created: 6/9/2011 * Course: CS0007 * Description: Shows the use of the Random Class *********************************************************************/ import java.util.Random; public class RandomClass { public static void main(String[] args) { Random randomNumbers = new Random(); System.out.println("Random double: " + randomNumbers.nextDouble()); System.out.println("Random int: " + randomNumbers.nextInt()); System.out.println("Random int between 0 and 100: " + randomNumbers.nextInt(100)); } }