Question: Create a java program that writes student information to a file. Use a loop to create five sets of student information. Each student will have
Create a java program that writes student information to a file. Use a loop to create five sets of student information. Each student will have firstname, lastname and id.
bob
smith
1234r
mary
jane
2345t
Name the file student.txt. Use FileWriter to write the data. Create a second java program that reads the student.txt file using the File class and Scanner. Use a while loop and the hasNext() method to read the data and System.out.println it to the screen.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
