Помогите, пожалуйста)
package com.javarush.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/*
Добрая Зинаида и летние каникулы
*/
public class Solution {
public static Map<String, Date> createMap() throws ParseException {
DateFormat dateFormat = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
Map<String, Date> map = new HashMap<>();
map.put("Сталлоне", dateFormat.parse("MAY 1 2012"));
map.put("hi", dateFormat.parse("May 1 2012"));
map.put("hu",dateFormat.parse("May 1 2012"));
map.put("ju",dateFormat.parse("May 1 2012"));
map.put("lo", dateFormat.parse("June 1 2012"));
map.put("jo", dateFormat.parse("July 1 2012"));
map.put("ko", dateFormat.parse("May 1 2012"));
map.put("lom", dateFormat.parse("May 23 204"));
map.put("lok", dateFormat.parse("May 1 43"));
map.put("lox", dateFormat.parse("May 1 2004"));
return map;
//напишите тут ваш код
}
public static void removeAllSummerPeople(Map<String, Date> map) {
//напишите тут ваш код
Iterator<Map.Entry<String,Date>>iterator = map.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<String,Date> entry = iterator.next();
}
if(entry.getValue().getMonth()==5 || entry.getValue().getMonth()==6||entry.getValue().getMonth
()==7){
it.remove();
}
}
public static void main(String[] args) throws ParseException{
Map<String,Date>map = createMap();
removeAllSummerPeople(map);
}
}