Choose the correct option based on this code segment
DateTimeFormatter dateFormat=DateTimeFormatter.ISO_DATE;
LocalDate dateOfBirth= LocalDate.of(2015,Month.FEBRUARY,31);
System.out.println(dateFormat.format(dateOfBirth));
What would be the output?
Choose the correct option from below list
(1)Prints 2015-02-03
(2)Java DateTimeException
(3)Prints 2015-02-31
Answer:-(2)Java DateTimeException | |