What is the result of the following?
public class Main { public static void main(String[] args) { LocalDateTime pi = LocalDateTime.of(2017, 3, 14, 1, 59); DateTimeFormatter formatter = DateTimeFormatter .ofPattern("M.ddhhmm"); System.out.println(formatter.format(pi)); } }
A.
While it is traditional to include the year when outputting a date, it is not required.
This code correctly prints the month followed by a decimal point.
After the decimal point, it prints the day of the month followed by the hours and minutes.