java.time.Duration.plusDays() 方法示例 java.time.Duration.plus() 方法示例 java.time.Duration.plusHours() 方法示例 java.time.Duration.plusDays() 方法示例 package com.codingdict; import java.time.Duration; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.ofSeconds(2); Duration duration1 = duration.plusDays(1); System.out.println(duration1.toMillis()); } } java.time.Duration.plus() 方法示例 java.time.Duration.plusHours() 方法示例