I want to get the Name, Surname and birthdate out of a txt file this is what I have
Scanner scFile = new Scanner (new File("BirthDates.txt"));
String Name;
int BirthDates = 0;
String Line = null;
while(scFile.hasNext())
{
Line = scFile.nextLine();
Scanner scLine = new Scanner(Line).useDelimiter("#");
Name = scLine.next();
BirthDates = scLine.nextInt();
scLine.close();
System.out.println(Name + BirthDates);
}
scFile.close();