Java Data Type How to - Get tomorrow date








Question

We would like to know how to get tomorrow date.

Answer

// w w w .j a  va  2  s  .c  om
import java.time.LocalDate;

public class Main {
  public static void main(String[] argv) {
    LocalDate today = LocalDate.now();
    LocalDate tomorrow = today.plusDays(1);
    System.out.println(tomorrow.isAfter(today));
    
  }
}

The code above generates the following result.