diff --git a/src/main/java/it/tdlight/common/utils/ScannerUtils.java b/src/main/java/it/tdlight/common/utils/ScannerUtils.java index a7b25ce..53df2d8 100644 --- a/src/main/java/it/tdlight/common/utils/ScannerUtils.java +++ b/src/main/java/it/tdlight/common/utils/ScannerUtils.java @@ -1,17 +1,8 @@ package it.tdlight.common.utils; -import java.util.Scanner; - public final class ScannerUtils { - private static final Scanner scanner; - - static { - scanner = new Scanner(System.in); - } - public static String askParameter(String displayName, String question) { - System.out.print("[" + displayName + "] " + question + ": "); - return scanner.nextLine(); + return System.console().readLine("[%s] %s", displayName, question); } }