Question: Which code, when inserted at (1), will make the program compile and execute normally? Select the three correct answers. (a) LocalTime time = LocalTime.parse(inputStr, dtf);
Which code, when inserted at (1), will make the program compile and execute
normally?

Select the three correct answers.
(a) LocalTime time = LocalTime.parse(inputStr, dtf);
(b) LocalDate date = LocalDate.parse(inputStr, dtf);
(c) LocalDateTime dateTime = LocalDateTime.parse(inputStr, dtf);
(d) String timeStr = LocalTime.MIDNIGHT.format(dtf);
(e) String dateStr = LocalDate.of(2015, 12, 24).format(dtf);
(f) String dateTimeStr = LocalDateTime.of(2015, 12, 24, 0, 0).format(dtf);
import java.time.LocalDate; import java.time.LocalDateTime; import java.time. LocalTime; import java.time.format. DateTime Formatter; public class RQ11A85 { public static void main(String[] args) { String pattern = "'Date:' dd |MM|yyyy"; String inputStr = "Date: 02|12|2015"; DateTime Formatter dtf = DateTime Formatter.of Pattern (pattern); // (1) INSERT CODE HERE. }
Step by Step Solution
3.46 Rating (162 Votes )
There are 3 Steps involved in it
b e and f The input string matches the pattern It specifies the datebased values ... View full answer
Get step-by-step solutions from verified subject matter experts
