One of the principles of Map is that the keys cannot be identical, but the task requires it. In Ideal, the code works with the same keys so that it only displays a value of several of the same keys, e. g. Entrance: Map<String,String> ludzie = new HashMap<>(); ludzie.put("Marcelina","Wardenga"); ludzie.put("Marcelina","Walnięta"); ludzie.put("Tomasz","Pięta"); ludzie.put("Tomasz","Pipeta"); Output: Marcelina Walnięta Tomasz Pipeta Can someone explain to me why he writes all over the place that the key has to be unique, but on this assignment it turns out he doesn’t have to?