package pl.codegym.task.task09.task0922; import; import; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /* Jaka dzisiaj jest data? */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(; String s = reader.readLine(); Date date = new SimpleDateFormat("yyyy-mm-dd").parse(s); SimpleDateFormat dateformat = new SimpleDateFormat("dd-mm-yyyy"); System.out.println(dateformat.format(date)); } } // why the task does not work if the result is correct