Fourth req is failing help me
package com.codegym.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.HashMap;
import java.util.Locale;
/*
Kind Emma and the summer holidays
*/
public class Solution {
public static HashMap<String, Date> createMap() throws ParseException {
DateFormat df = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
HashMap<String, Date> map = new HashMap<String, Date>();
map.put("Stallone", df.parse("JUNE 1 1980"));
map.put("Stallone1", df.parse("JUNE 2 1980"));
map.put("Stallone2", df.parse("JUNE 2 1980"));
map.put("Stallone3", df.parse("JUNE 3 1980"));
map.put("Stallone4", df.parse("JUNE 5 1980"));
map.put("Stallone5", df.parse("JUNE 6 1980"));
map.put("Stallone6", df.parse("SEPTEMBER 1 1980"));
map.put("Stallone7", df.parse("JUNE 7 1980"));
map.put("Stallone8", df.parse("JUNE 8 1980"));
map.put("Stallone9", df.parse("JUNE 9 1980"));
return map;
}
public static void removeAllSummerPeople(HashMap<String, Date> map) throws ParseException {
DateFormat df = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
Iterator<Map.Entry<String,Date>> ite = map.entrySet().iterator();
while( ite.hasNext())
{
Map.Entry<String, Date> value = ite.next();
if((value.getValue().compareTo(df.parse("AUGUST 31 1980")))<1 &&
(value.getValue().compareTo(df.parse("JUNE 1 1980")))>=0)
ite.remove();
}
// System.out.println(map);
}
public static void main(String[] args) throws ParseException {
removeAllSummerPeople(createMap());
}
}