java.time.Duration.from() 方法示例 java.time.Duration.equals() 方法示例 java.time.Duration.get() 方法示例 java.time.Duration.from() 方法示例 package com.codingdict; import java.time.Duration; import java.time.temporal.ChronoUnit; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.from(ChronoUnit.DAYS.getDuration()); System.out.println(duration.toMinutes()); } } java.time.Duration.equals() 方法示例 java.time.Duration.get() 方法示例