LocalDate has private access in LocalDate

This question already has an answer here:

  • In Java, difference between package private, public, protected, and private 26 answers

  • The constructor you are calling is private.

    You need to call

    LocalDate birthDate = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day));
    

    to construct your date.

    链接地址: http://www.djcxy.com/p/24062.html

    上一篇: Java中的访问修饰符

    下一篇: LocalDate在LocalDate中拥有私人访问权限