Won't pass the final test, however, when I include a print statement at the end of the removeItemFromMap method using entrySet(), no entries below 500 are present (in intelliJ at least).
package com.codegym.task.task08.task0818;
import java.util.HashMap;
import java.util.Map;
/*
Only for the rich
*/
public class Solution {
public static HashMap<String, Integer> createMap() {
HashMap<String, Integer> yes = new HashMap<>();
for(int i = 0; i < 10; i++){
yes.put("Justin" + i, 495+i);
}
return yes;
}
public static void removeItemFromMap(HashMap<String, Integer> map) {
for(int i = 0; i < 10; i++){
if((map.get("Justin" + i)) < 500){
map.remove("Justin" + i);
}
}
}
public static void main(String[] args) {
}
}