while (1 == 1) { System.out.println("Guess a number, 0-100."); // Read the user input String input = reader.nextLine(); // If player wants to quit, then we switch off the playing switch (loop bottoms) if (input == "quit") { break; } }