hi danpost
i am doing this java program about a hospital that require a guie but the administrative class has to be connected to the GUI and it also require that it read a file that contain all of the administrative staff of the hospital, doctor, dermatologist, cardiologist, student, full-time job, part time job, exchange students, the visa, courses and GPA.
the problem that I am having is getting the program to read the file. i am using the burreredreader, inputstreamread and filereader but for some reason am not getting the bufferedreader to read the file, it is giving me an error that says, it cannot find symbol and to create a field in the administrative class
can you tell me what i am doing wrong. I have put the file exactly where it supposed to be in order for it to read the file. here is the codes that i am using:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); FileReader fr = null ; try { fr = new FileReader(txtarea.txt); br = new BufferedReader(fr); String rCurrentLine; br = new BufferedReader( new FileReader(txtarea.txt)); while ((rCurrentLine = br.readLine()) != null ){ System.out.println(txtarea.txt); } } catch (IOException e){ } } |