Advertisement
Cyrixxontwitch

Untitled

Dec 14th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public void userInfoName() {
  2.  
  3. System.out.println("First name: ");
  4. String firstName = ui.nextLine();
  5. while (firstName.isBlank() || firstName.contains("[1-9]")) {
  6. System.out.println("Try again.");
  7. System.out.println("First name: ");
  8. ui.nextLine();
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement