public class Solution {

    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        SimpleDateFormat formatWejscia = new SimpleDateFormat("yyyy-MM-dd");
        Date data = new Date();
        try {
            data = formatWejscia.parse(reader.readLine());
        }
        catch (ParseException e) {
            System.out.println(e.getMessage());
        }
        SimpleDateFormat formatWyjsciowy = new SimpleDateFormat("dd MMM yyyy", new Locale("pl"));
        System.out.println(formatWyjsciowy.format(data).toUpperCase());
    }
}
Przykładowe dane wejściowe: 24-12-2020 Wynik: 12 CZE 0030 Jak obsłużyć ten błąd?