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