代码展示:
import java.time.LocalDateTime;
public class test{
public static void main(String[] args) {
LocalDateTime currentDateTime=LocalDateTime.now();
System.out.println(currentDateTime);
}
}
运行结果:

代码展示:
import java.time.LocalDateTime;
public class test{
public static void main(String[] args) {
LocalDateTime currentDateTime=LocalDateTime.now();
System.out.println(currentDateTime);
}
}
运行结果: