System.setIn(new FileInputStream(new File("input.txt")));
但是,¿我必须在哪里保存文本文件? 我有一些错误,例如
Exception in thread "main" java.io.FileNotFoundException: help.txt (El sistema no puede encontrar el archivo especificado)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)