Just go and use the java.timemodern Java date and time API. DateTimeFormatter.ofPattern("uuuu-MM-dd")parses it 00like a month and then an object, because it does not follow a hyphen -(that is, before even checking that 00 is not a valid month number).
, java.time. SimpleDateFormat, , , .
: Oracle: , , java.time.