final static LocalDateTime retrieving from another class is throwing java.lang.ExceptionInInitializerError
问题 I have a variable MINDATE in MyConstants file. You can see the declaration below. public static final LocalDateTime MINDATE = LocalDateTime.of(LocalDate.of(2011, 1, 1), LocalTime.MIDNIGHT); I am consuming this variable in another class just by using MyConstants.MINDATE then I get the following exception Exception in thread "main" java.lang.ExceptionInInitializerError at com.cw.na.vos.DateTest.main(DateTest.java:14) Caused by: java.lang.IllegalArgumentException: Unknown pattern letter: T at