I'm new to java and I'm attempting to write a simple database using static arrays.
The problem that i cannot get past is in a method that reads a text file into the array.
Below is the .txt file that the method is reading from.
(note: "|" is used as the delimeter and there are not supposed to be lines between each entry in the .txt file.)
Bob|Marleyemail@example.com|Monday, Tuesday, Thursday before and after school|Intermediate|CompSci
John|Doefirstname.lastname@example.org|Monday, Thursday after school|Novice|CompSci
Billy|Maysemail@example.com|Monday, Tuesday before school|Expert|CompSci
Fred|Flintstonefirstname.lastname@example.org|Monday, Tuesday, Thursday before and after school|Newbie|CompSci
And this is the file reading method:
public void read(File f)
members = new TeamMember;
count = 0;
Scanner input = null;
input = new Scanner(f);
input = input.useDelimiter("|");
String first = input.next();
String last = input.next();
String email = input.next();
String avail = input.next();
String skill = input.next();
String exp = input.next();
TeamMember temp = new TeamMember(first, last, email, avail, skill, exp);
catch (FileNotFoundException e)
System.out.println("/n ERROR: " + e.getMessage());
I have not the slightest clue on how to fix this issue. I've been searching around on Google for the past 3 hours.
Please help me solve this issue, this is due soon.. :(
Any and all help is greatly appreciated! :D