Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WhileLoop {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- String answer = "yes";
- do {
- System.out.print("Subscribed yet?");
- answer = input.nextLine();
- } while (!answer.equals("yes"));
- System.out.print("Thanks!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment