Build a pattern, see the output. Or take a formatted string and parse it back into a LocalDate. Two directions, one tool.
java.time.format. You build one with DateTimeFormatter.ofPattern("...") using letter codes below, then pass it to format() to output a string — or to parse() to turn a string into a date.
DateTimeParseException. Bad month, wrong separator, extra text — all throw.
Tip: the letters are case-sensitive. MM means month, mm means minute — don't mix them up (this is the #1 date format bug).