I have the suspicion that I am making the same error that is preventing me from passing several tasks. Can someone help me out? If I can understand why this last task won't validate, then I may be able to complete other tasks as well.
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> map = new HashMap<>();
for (int i=0; i<10; i++){
map.put("A"+i, i+100);
}
return map;//write your code here
}
public static void removeItemFromMap(HashMap<String, Integer> map) {
for (Map.Entry<String, Integer> pair : map.entrySet()){
if (pair.getValue()<500)
map.remove(pair);
removeItemFromMap(map);
break;
}//write your code here
}
public static void main(String[] args) {
}
}