//This application simulates drawing a card randomly from a deck import java.util.Random; public class Card { public static void main(String args[]) { Random random = new java.util.Random(); int drawn; // normalize to 52 outcomes, // and add 1 to get a random integer 1..52 drawn = java.lang.Math.abs(random.nextInt())%52+1; System.out.println("the card drawn is number " + drawn); } } /* the card drawn is number 5 */