java.time.LocalDateTime.now() 方法示例 java.time.LocalDateTime.minusYears() 方法示例 java.time.LocalDateTime.now(Clock clock) java.time.LocalDateTime.now() 方法示例 package com.codingdict; import java.time.LocalDateTime; public class LocalDateTimeDemo { public static void main(String[] args) { LocalDateTime date = LocalDateTime.now(); System.out.println(date); } } java.time.LocalDateTime.minusYears() 方法示例 java.time.LocalDateTime.now(Clock clock)