Не выполняется последнее условие.
package com.javarush.task.task08.task0818;
import java.util.HashMap;
import java.util.Map;
/*
Только для богачей
*/
public class Solution {
public static Map<String, Integer> createMap() {
Map<String, Integer> map = new HashMap();
map.put("Иванов1", 150);
map.put("Иванов2", 750);
map.put("Иванов3", 800);
map.put("Иванов4", 200);
map.put("Иванов5", 100);
map.put("Иванов6", 340);
map.put("Иванов7", 500);
map.put("Иванов8", 490);
map.put("Иванов9", 499);
map.put("Иванов10", 580);
return map;//напишите тут ваш код
}
public static void removeItemFromMap(Map<String, Integer> map) {
for (Map.Entry<String, Integer> entry : map.entrySet())
{
String key = entry.getKey();
int value = entry.getValue();
if (value < 500)
{
map.remove(key, value);
}
}//напишите тут ваш код
}
public static void main(String[] args) {
}
}