code: private void enterPackageName(BufferedReader br) throws IOException {
          String suggestedRootPackage = getDefaultRootPackage() + "." + appName;
          while (true) {
              printInstruction("Enter the Java root package of your application: [" + suggestedRootPackage + "]");
  
              String packageNameCandidate = br.readLine();
              if (isBlank(packageNameCandidate)) {
                  rootPackage = suggestedRootPackage;
                  break;
              } else {
                  if (isPackageNameValid(packageNameCandidate)) {
                      rootPackage = packageNameCandidate;
                      break;
                  } else {
                      System.out.println("Oops! invalid Java package name.");
                      System.out.println("");
                      continue;
                  }
              }
          }
      }
docs: Ask the user to enter the package name.