int EID, ESSN, EM, FSSN, FM;
String EN, EEN, FN;
Scanner Ein = new Scanner(employer);
Scanner Fin = new Scanner(filers);
Ein.useDelimiter(", *");
Fin.useDelimiter(", *");
ArrayList<Employer> EmployIn = new ArrayList<Employer>();
ArrayList<Filer> FilerIn = new ArrayList<Filer>();
while (Ein.hasNextLine())
{
EN = Ein.next(); EID = Ein.nextInt(); EEN = Ein.next(); ESSN = Ein.nextInt(); EM = Ein.nextInt();
EmployIn.add(new Employer(EN, EID,EEN,ESSN,EM));
}
Here is a snippet of code that I am working on. I keep getting java.util,InputMismatchException:null (in java.util.Scanner)
In the employer file it is structured like:
Google, 0, BOX CHARLES, 724113610, 50
Microsoft, 2, YOUNG THOM, 813068590, 50
Amazon, 4, MCGUIRE MARK, 309582302, 50
Facebook, 8, MOFFITT DON, 206516583, 50
I have no idea why I am getting the mismatch. If anyone could help, that would be amazing.