Java FileNotFoundException although file is there
问题 I set up the method to try/catch this error. My issue is that it catches the fileNotFoundException for Trivia.txt even when I explicitly created Trivia.txt in the same package. I can't figure out why the file is not being found. I did some looking around for the answer to my problem, and had no luck. Anyway, here's my code public static void readFile(){ try{ File file = new File("Trivia.txt"); FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); while((line = br