public class CLIENT_PATH { String PATH; Path Path; public void INPUT_PATH(){ out.println("Введите путь"); do { out.print(" "); Scanner in = new Scanner(System.in); PATH = in.next(); Path = Paths.get(PATH); if (Files.exists(Path)) { out.println(" Путь введён\n"); } else out.println(" Ошибка"); } while(Files.notExists(Path)); out.println(PATH); } } Why when entering Russian characters K (R), P (G), O (J), and M (V) and possibly others throws an exception and writes in the answer that completely different characters are entered?
Enter the path
P
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <? > at index 0:?
Enter the path
m
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <<> at index 0: <