set todays date in java code example Example: get today date in java 8 LocalDate localDate = LocalDate.now();