Code example for Console

Methods: readLine

0
      } 
    } 
 
    @Override 
    public void waitForUser() { 
      if (console.readLine("Press enter to continue ") == null) {
        throw abort(); 
      } 
    } 
 
    @Override 
    public String readString(String def, String fmt, Object... args) {
      final String prompt = String.format(fmt, args);
      String r;
      if (def != null) {
        r = console.readLine("%-30s [%s]: ", prompt, def);
      } else { 
        r = console.readLine("%-30s : ", prompt);
      } 
      if (r == null) {
        throw abort();