こんにちは、コードにこれがあります
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
すべての .java ファイルと同じフォルダーに words.txt ファイルがあります。
私は何を間違っていますか?ありがとう!