Given this code segment.
ZoneId zoneId = ZoneId.of("Asia/Singapore");
ZonedDateTime zonedDateTime =
ZonedDateTime.of(LocalDateTime.now(), zoneId);
System.out.println(zonedDateTime.getOffset());
assume that the time-offset value for the Asia/Singapore time zone from UTC/Greenwich is +08:00.
Choose the correct option.
D.
given a ZonedDateTime object, the getOffset()
method returns a ZoneOffset object that corresponds to the offset of the time zone from UtC/greenwich.
given that the time-offset value for the asia/singapore zone from UtC/greenwich is +08:00, the toString()
method of ZoneOffset prints the string "+08:00" to the console.