Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void userInfoName() {
- System.out.println("First name: ");
- String firstName = ui.nextLine();
- while (firstName.isBlank() || firstName.contains("[1-9]")) {
- System.out.println("Try again.");
- System.out.println("First name: ");
- ui.nextLine();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement