tharglet

Untitled

May 2nd, 2014
154
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. /**
  4. *
  5. * @author tharglet
  6. */
  7. public class Questions {
  8.  
  9. /**
  10. * @param args the command line arguments
  11. */
  12. public static void main(String[] args) {
  13. boolean dontQuit = true;
  14. Scanner s = new Scanner(System.in);
  15. while (dontQuit) {
  16. System.out.println("What's your posion?");
  17. String input = s.nextLine();
  18. if (input.equals("cyanide")) {
  19. doCyanide();
  20. } else if (input.equals("quit")) {
  21. dontQuit = false;
  22. }
  23. }
  24. System.exit(0);
  25. }
  26.  
  27. private static void doCyanide() {
  28. System.out.println("Good Choice! Lovely Bottle!");
  29. }
  30. }
RAW Paste Data