code: protected String readLineWithMessage(String message)
      {
          System.out.print(message + " ");
          try
          {
              BufferedReader rin = new BufferedReader(new InputStreamReader(System.in));
              return rin.readLine();
          }
          catch (Exception e)
          {
              return "";
          }
      }
docs: read a single line from stdin and return as String