String date = "1992-07-25";
LocalDate dt = LocalDate.parse(date);
System.out.println(dt) // 1992-07-25 ( output )
DateTimeFormatter f = DateTimeFormatter.ofPattern("d/MM/yyyy");
String s1 = f.format(dt);
System.out.println(s1) // 25/07/1992 ( output in string format )
I want this (String) s1 to convert into LocalDate of pattern (LocalDate - dd/MM/yyy)
Output - 25/07/1992 should be LocalDate Type, not String