正解:A
I've run the following code without any problem
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
public class Main {
public static void main(String[] args) {
LocalDate date1 = LocalDate.now();
LocalDate date2 = LocalDate.of(2014, 6, 20);
LocalDate date3 = LocalDate.parse("2014-06-20", DateTimeFormatter.ISO_DATE); System.out.println("date 1 = " + date1); System.out.println("date 2 = " + date2); System.out.println("date 3 = " + date3);
}
}
The output is
date 1 = 2015-09-05 (because run today, but problem statement says we must assume that the system data is June 20, 2014) date 2 = 2014-06-20 date 3 = 2014-06-20