Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void chatter() {
- double randomDouble = newRandom.nextDouble();
- int response = newRandom.nextInt(3);
- if (randomDouble >= 0.5) {
- switch (response) {
- case 0:
- System.out.println("Oh, you're going for broke, huh?");
- break;
- case 1:
- System.out.println("Aw c'mon, take a chance!");
- break;
- case 2:
- System.out.println("You're up big. Now's the time to cash in your chips!");
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement