Minimum date in Java

后端 未结 6 2053
醉话见心
醉话见心 2020-12-11 00:06

What is the minimum date value in Java?

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 00:45

    LocalDateTime MIN defines the minimum supported LocalDateTime, '-999999999-01-01T00:00:00'. This is the local date-time of midnight at the start of the minimum date.

    public static final LocalDateTime MIN; this is the MIN syntax;

    import java.time.LocalDateTime;
    public class Main {
      public static void main(String[] args) {
        LocalDateTime a = LocalDateTime.MIN;
    
        System.out.println(a);
      }
    }
    

提交回复
热议问题