Guest User

Untitled

a guest
May 4th, 2023
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class WhileLoop {
  2. public static void main(String[] args) {
  3. Scanner input = new Scanner(System.in);
  4. String answer = "yes";
  5. do {
  6. System.out.print("Subscribed yet?");
  7. answer = input.nextLine();
  8. } while (!answer.equals("yes"));
  9. System.out.print("Thanks!");
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment