List의 removeAll() 과 clear() 비교
public class Main{
public static void main(String[] args){
List<Integer> li = new ArrayList<>();
Set<Integer> m = new HashSet<>();
for(int i=0;i<100000;i++){
li.add(i);m.add(i);
}
li.removeAll(m);
}
}

Last updated