[Solved] How to remove some items from an arraylist without loop and less time complexity?

[ad_1]

List<Type> list = ...
list.removeIf(item -> item.getId() == something);

As the name suggests, removeIf() removes all elements if they satisfy the predicate.

7

[ad_2]

solved How to remove some items from an arraylist without loop and less time complexity?