DateTimeFormatterBuilder allows for complex and custom date-time formatting beyond predefined styles.
Source Code
DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.appendValue(ChronoField.MONTH_OF_YEAR, 2)
.appendLiteral('/')
.appendValue(ChronoField.DAY_OF_MONTH, 2)
.appendLiteral('/')
.appendValue(ChronoField.YEAR, 4)
.toFormatter();
LocalDate date = LocalDate.now();
System.out.println(date.format(formatter)); // Formats current date with custom pattern