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