Java: How to get the current date (and time) in Java 8, 11, 14, 17, etc.To get the current date in Java, use LocalDate.now() with Java 8 and newer versions.