public static Duration between(Temporal startInclusive, Temporal endExclusive)///
1. Duration.between method computes the duration between two temporal objects. If the objects are of different types, then the duration is calculated based on the type of the first object. For example, if the first argument is a LocalTime then the second argument is converted to a LocalTime. (Not the case here because both arguments are of ZonedDateTime).
2. In this case, the difference between the two zones is 3 hours therefore the resulting duration will contain 3 hours.
3. The result of Duration.between method can be a negative period if the end is before the start. This is NOT the case here. Therefore, the Duration.between will return be plus 3 hrs and not minus 3 hours.
if the expression is a constant expression (§15.28) of type byte, short, char, or int:
A narrowing primitive conversion may be used if the type of the variable is byte, short, or char, and the value of the constant expression is representable in the type of the variable.
Les Morgan wrote:krishna,
... white space is highly subjective to the audience and who is paying the bills.
Les