localdate to string java code example
Example 1: format localdate java
LocalDate today = LocalDate.now();
String formattedDate = today.format(DateTimeFormatter.ofPattern("dd-MMM-yy"));
System.out.println(formattedDate);
Example 2: localdate to string java
LocalDate today = LocalDate.now();
System.out.println(today.toString());