It doesn't even print anything. Where is the mistake?
package com.codegym.task.task19.task1921;
import java.io.FileReader;
import java.io.IOException;
import java.sql.SQLOutput;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Scanner;
/*
John Johnson
*/
public class Solution {
public static final List<Person> PEOPLE = new ArrayList<>();
public static void main(String[] args) throws IOException, ParseException {
FileReader fileReader = new FileReader(args[0]);
Scanner scanner = new Scanner(fileReader);
fileReader.close();
int index =0;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM dd yyyy");
Date birthDay;
while (scanner.hasNext()){
String line = scanner.nextLine();
for (int i = 0; i <line.length(); i ++){
if (Character.isDigit(line.charAt(i))) {
index = i;
break;
}
}
String name = line.substring(0, index-1);
String date = line.substring(index, line.length());
String[] arr = date.split(" ");
date = arr[0] +" "+arr[1]+" "+arr[2];
birthDay = simpleDateFormat.parse(date);
PEOPLE.add(new Person(name, birthDay));
}
}
}