// This application simulates throwing a single die import java.util.Random; public class Die { public static void main(String args[]) { Random random = new Random(); // roll a die: int side = Math.abs(random.nextInt())%6+1; System.out.println("the die is showing a "+side); } } /* the die is showing a 2 */