Added default value to console output

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2017-04-19 15:44:47 +02:00
parent 266e53aba1
commit 7c4a6a7dbe

View File

@ -30,7 +30,7 @@ class FormUtil {
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { try {
System.out.print(label+": "); System.out.print(label + (!defaultValue.isEmpty() ? "[" + defaultValue + "]" : "") + ": ");
ret = stdin.readLine(); ret = stdin.readLine();
ret = ret.isEmpty() ? defaultValue : ret; ret = ret.isEmpty() ? defaultValue : ret;
} catch (IOException e) { } catch (IOException e) {