public class Solution {
public static final List<person> PEOPLE = new ArrayList<person>();
public static void main(String[] args) throws IOException, ParseException
{
BufferedReader br = new BufferedReader(new FileReader(args[0]));
String line;
while((line = br.readLine()) != null) {
String String = line.replaceAll("[a-zA-Zа-za-z]+", "").trim();
SimpleDateFormat format = new SimpleDateFormat("dd mm yyyy");
Date Date = format.parse(string);
String name = line.replaceAll("[\\d]+", "");
PEOPLE.add(new Person(name, date));
}
for (int i = 0; i < PEOPLE.size(); i++)
{
System.out.println(PEOPLE.get(i).getName() + "" + PEOPLE.get(i).getBirthday());
}
}
}</person></person>
Find more questions by tags Java
otherwise, if not difficult, can my code example to show where to write? - Brady commented on July 8th 19 at 11:50
format.format(PEOPLE.get(i).getBirthday()));
the first format is swearing.. - Brady commented on July 8th 19 at 11:56
SimpleDateFormat format = new SimpleDateFormat("dd MM yyyy"); - tamara.Lehner88 commented on July 8th 19 at 11:59