I would like to parse a date format **YYYY-MM-DD** into the following **MMM dd, yyyy**.
This is my part of code which is causing DateTimeParseException - >

`DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("MMM dd, yyyy"); LocalDate localDate = LocalDate.parse("2002-10-01",dateTimeFormatter1);`

The exception message when I try to parse the date with the given format is:
`Method threw 'java.time.format.DateTimeParseException' exception. Text '2002-10-01' could not be parsed at index 0.`