Подскажите в чем проблема?
package com.javarush.task.task19.task1904;
import java.io.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Scanner;
/*
И еще один адаптер
*/
public class Solution {
public static void main(String[] args) {
}
public static class PersonScannerAdapter implements PersonScanner {
private final Scanner fileScanner;
public PersonScannerAdapter(Scanner fileScanner) {
this.fileScanner = fileScanner;
}
@Override
public Person read() throws IOException, ParseException {
String[] sc = fileScanner.nextLine().split(" ");
String fn = sc[1];
String mn = sc[2];
String ln = sc[0];
DateFormat df = new SimpleDateFormat("dd mm yyyy", Locale.ENGLISH);
Date bd = df.parse(sc[3] + " " + sc[4] + " " + sc[5]);
return new Person(fn, mn,ln, bd);
}
@Override
public void close() throws IOException {
fileScanner.close();
}
}
}