Remove scanner

This commit is contained in:
Andrea Cavalli 2021-10-23 23:50:42 +02:00
parent 40f845cdce
commit 9e7f2c8f75

View File

@ -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);
}
}