Java Data Type How to - Get the same day next year


We would like to know how to get the same day next year.


import java.time.LocalDate;
//from  ww w .ja  va2 s  . c  o m
public class Main {
  public static void main(String[] args) {
    LocalDate today =;

    LocalDate nextYear = today.plusYears(1);

    System.out.println(String.format("Today %s and next year %s", today,

The code above generates the following result.