Guest User

Untitled

a guest
Dec 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. class Beginning {
  5. public static void main(String args[]) {
  6. Scanner myScanner = new Scanner(System.in);
  7.  
  8. String firstName;
  9. String answerSword;
  10. String answerMenuNew;
  11. char answerMenuNew1;
  12.  
  13. System.out.println("Text Adventure v0.001");
  14. System.out.println();
  15.  
  16. System.out.println("New Game? y/n");
  17. answerMenuNew = myScanner.nextLine();
  18. answerMenuNew1 = answerMenuNew.charAt(0);
  19.  
  20. if answerMenuNew1('y')
  21. System.out.println("New Game COMMENCE.");
  22. else
  23. System.out.println("GAME OVER");
  24.  
  25. }
  26. }
Add Comment
Please, Sign In to add comment