If any one know where the problem is kindly let me know how to solve it.
package com.codegym.task.task08.task0814;
import java.util.HashSet;
import java.util.Set;
/*
Greater than 10? You're not a good fit for us
*/
public class Solution {
public static HashSet<Integer> createSet() {
//write your code here
HashSet<Integer> numbers = new HashSet<>();
numbers.add(1);
numbers.add(2);
numbers.add(3);
numbers.add(4);
numbers.add(5);
numbers.add(11);
numbers.add(12);
numbers.add(13);
numbers.add(14);
numbers.add(15);
numbers.add(6);
numbers.add(7);
numbers.add(8);
numbers.add(9);
numbers.add(10);
numbers.add(16);
numbers.add(17);
numbers.add(18);
numbers.add(19);
numbers.add(20);
return numbers;
}
public static HashSet<Integer> removeAllNumbersMoreThan10(HashSet<Integer> set) {
//write your code here
for(Integer num : set){
if(num > 10){
set.remove(num);
}
}
return set;
}
public static void main(String[] args) {
}
}