<分区>
你好,我的代码里有这个
File file = new File("words.txt");
Scanner scanFile = new Scanner(new FileReader(file));
ArrayList<String> words = new ArrayList<String>();
String theWord;
while (scanFile.hasNext()){
theWord = scanFile.next();
words.add(theWord);
}
但出于某种原因我得到了一个
java.io.FileNotFoundException
我的 words.txt 文件与我所有的 .java 文件位于同一文件夹中
我做错了什么?谢谢!