I want to continue the for each loop, what do I need to change to make it work?
package de.codegym.task.task08.task0814;
import java.util.HashSet;
import java.util.Set;
/*
Größer als 10? Du passt nicht gut zu uns
*/
public class Solution {
public static HashSet<Integer> setErstellen() {
// schreib hier deinen Code
HashSet<Integer> set = new HashSet<Integer>();
for(int i=0;i<20;i++){
set.add(i);
}
return set;
}
public static HashSet<Integer> alleZahlenGroesserAls10Entfernen(HashSet<Integer> set) {
// schreib hier deinen Code
for (int a : set){
if(a>10){
set.remove(a);
}
}
return set;
}
public static void main(String[] args) {
}
}