last requir doesn't met. Why?
It works correct in IDE
package com.codegym.task.task08.task0814;
import java.util.HashSet;
/*
Greater than 10? You're not a good fit for us
*/
public class Solution {
public static HashSet<Integer> createSet() {
HashSet<Integer> h = new HashSet<>();
for (int i = 0; i <20 ; i++) {
h.add(i);
}
return h;
}
public static HashSet<Integer> removeAllNumbersGreaterThan10(HashSet<Integer> set) {
// write your code here
HashSet<Integer> copy = new HashSet<>(set);
for (int i = 0; i < copy.size(); i++) {
if (i>10){
set.remove(i);
}
}
return set;
}
public static void main(String[] args) {
}
}