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