How to get tomorrows date in Java

1 Answer

0 votes
import java.time.LocalDate;

public class Main {
    public static void main(String[] args) {
        // Get today's date
        LocalDate today = LocalDate.now();

        // Calculate tomorrow's date by adding one day
        LocalDate tomorrow = today.plusDays(1);

        System.out.println("Tomorrow's date is: " + tomorrow);
    }
}


/*
run:

Tomorrow's date is: 2025-04-10

*/

 



answered Apr 9, 2025 by avibootz
...