Java, Java8, Java21, Java17, Migration.
date-time LocalDate currentDate = LocalDate.now(); LocalTime currentTime = LocalTime.now(); LocalDateTime currentDateTime = LocalDateTime.now(); System.out.println("Current Date: " + currentDate); System.out.println("Current Time: " + currentTime); System.out.println("Current Date-Time: " +