Given the code fragment:
What is the result?
A. May 04, 2014T00:00:00.000
B. 2014-05-04T00:00: 00. 000
C. 5/4/14T00:00:00.000
D. An exception is thrown at runtime.
Given the code fragment:
What is the result?
A. May 04, 2014T00:00:00.000
B. 2014-05-04T00:00: 00. 000
C. 5/4/14T00:00:00.000
D. An exception is thrown at runtime.
D
DateTimeParseException
D:
# javac Test2.java
Test2.java:3: error: cannot find symbol
String date = LocalDate.parse(“2014-05-04”).format(DateTimeFormatter.ISO_DATE_TIME);
^
symbol: variable DateTimeFormatter
location: class Test2
Test2.java:3: error: cannot find symbol
String date = LocalDate.parse(“2014-05-04”).format(DateTimeFormatter.ISO_DATE_TIME);
^
symbol: variable LocalDate
location: class Test2