Question: How can I use the buffered reader for input a text file? it's giving me File not found exception error. the file is named CourseFor
How can I use the buffered reader for input a text file?
it's giving me File not found exception error. the file is named CourseFor Program.txt and its located on my mac Desktop under Lab 11 folder

public static void readData(LinkedListccourse> aList) throws NumberFormatException, IOException( String line; BufferedReader br BufferedReader(new FileReader (System.getProperty("user.dir") + "\\Lab 11\\CourseForProgram . txt")); = new while ((line = br . readLine()) != null){ String[ ] colon-line . split(": "); Stringt1 classLevel-colon(0].split(" "); //class &level Stringl1 descGrade-colon( 1).split(" ") //description & grade Course temp; if (descGrade.length >1) //if a grade is present aList.add(new Course(classLevel[0], Integer.parseInt (classLevel[1]), descGrade[0], descGrade[ 11)) elset aList.add (new Course(classLevel[0], Integer.parseInt (classLevel[1], descGrade[0], null))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
