java.time.Duration.minusMinutes() 方法示例 java.time.Duration.minusMillis() 方法示例 java.time.Duration.minusNanos() 方法示例 java.time.Duration.minusMinutes() 方法示例 package com.codingdict; import java.time.Duration; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.ofMinutes(5); System.out.println(duration.getSeconds()); Duration duration1 = duration.minusMinutes(3); System.out.println(duration1.getSeconds()); } } java.time.Duration.minusMillis() 方法示例 java.time.Duration.minusNanos() 方法示例