last two sucks!
package com.codegym.task.task19.task1921;
import java.util.ArrayList;
import java.util.List;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Date;
import java.text.ParseException;
import java.io.IOException;
import java.text.SimpleDateFormat;
/*
John Johnson
*/
public class Solution {
public static final List<Person> PEOPLE = new ArrayList<>();
public static void main(String[] args) throws IOException{
String fileName = args[0];
Person p =null;
BufferedReader b = new BufferedReader(new FileReader(fileName));
while(b.ready()){
String s = b.readLine();
///String[] ss = s.split(" ")
//for(int i=0;i<ss.length;i++){
String s1 = s.replaceAll("[0-9]","").trim();
String s2 = s.replaceAll("[^0-9]","");
SimpleDateFormat sdf = new SimpleDateFormat("MM dd yyyy");
try{ Date d = sdf.parse(s2);
PEOPLE.add(new Person(s1,d));
} catch(ParseException pp){}
}
b.close();
}
}