Java LocalDate add day

Description

Java LocalDate add day

import java.time.LocalDate;
import java.time.Month;

public class Main {
  public static void main(String[] args) {
    LocalDate ld1 = LocalDate.of(2020, Month.JANUARY, 31);
    LocalDate ld2 = ld1.plusDays(30);
    LocalDate ld3 = ld1.plusDays(555);
    System.out.println(ld1);/*www.  j av  a2 s.  c o  m*/
    System.out.println(ld2);
    System.out.println(ld3);
  }
}



PreviousNext

Related