DATE & TIME API: Java 8 LocalDateTime
LocalDateTime is an immutable date-time object that represents a date-time with default format as yyyy-MM-dd-HH-mm-ss.zzz. It provides a factory method that takes LocalDate and LocalTime input arguments to create LocalDateTime instance.
we have seen that if we provide invalid arguments for creating Date/Time, then it throws java.time.DateTimeException, which is a RuntimeException so we don’t need to explicitly catch it.
we can get Date/Time data by passing ZoneId, you can get the list of supported ZoneId values from its JavaDoc.
On this page of the site you can watch the video online DATE & TIME API: Java 8 LocalDateTime | Java 8 Version with a duration of hours minute second in good quality, which was uploaded by the user Testing Tutorialspoint 24 August 2022, share the link with friends and acquaintances, this video has already been watched 68 times on youtube and it was liked by 2 viewers. Enjoy your viewing!