java.time.Duration.toDays() 方法示例 java.time.Duration.subtractFrom() 方法示例 java.time.Duration.toHours() 方法示例 java.time.Duration.toDays() 方法示例 package com.codingdict; import java.time.Duration; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.ofHours(36); System.out.println(duration.toDays()); } } java.time.Duration.subtractFrom() 方法示例 java.time.Duration.toHours() 方法示例