Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1.     private static void chatter() {
  2.         double randomDouble = newRandom.nextDouble();
  3.         int response = newRandom.nextInt(3);
  4.         if (randomDouble >= 0.5) {
  5.            
  6.             switch (response) {
  7.             case 0:
  8.                 System.out.println("Oh, you're going for broke, huh?");
  9.                 break;
  10.             case 1:
  11.                 System.out.println("Aw c'mon, take a chance!");
  12.                 break;
  13.             case 2:
  14.                 System.out.println("You're up big. Now's the time to cash in your chips!");
  15.                 break;
  16.             }
  17.         }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement