Guest User

Untitled

a guest
Oct 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class myGame {
  4.  
  5. private static Scanner s = new Scanner(System.in);
  6. private static String input;
  7.  
  8. public static void main(String[] args) {
  9. runGame();
  10. while (true) {
  11. System.out.print("Would you like to play again? (y/n) >> ");
  12. input = s.nextLine().toLowerCase();
  13. if (input.equals("y") runGame();
  14. else break;
  15. }
  16. }
  17.  
  18. public void runGame {
  19. // your code here
  20. }
  21. }
Add Comment
Please, Sign In to add comment