Given the following code, which of the answer choices can fill in the blank to print true?
(Choose all that apply.)
String m1 = Duration.of(1, ChronoUnit.MINUTES).toString(); String m2 = Duration.ofMinutes(1).toString(); String s = Duration.of(60, ChronoUnit.SECONDS).toString(); String d = Duration.ofDays(1).toString(); String p = Period.ofDays(1).toString(); System.out.println( );
B, C.
Options A and D are incorrect because the String references do not point to the same object.
Option E is incorrect because a Period format begins with a P and a Duration format begins with PT.
They are different types and do not represent the same value even though they are both a day.
Remember that Duration uses hours/minutes/seconds and Period uses years/months/days for measures.
Options B and C are correct because m1, m2, and s all represent a duration of the same length.