Eliminate all even numbers from the list.
import
public
}
|
Definition and Usage
The removeIf() method removes all elements from
the list that satisfy a specified condition. This condition can be expressed
through a lambda expression compatible with Java’s Predicate interface’s test() method.
Syntax
public boolean removeIf(Predicate condition) |
Parameter Values
Parameter |
Description |
condition |
Mandatory: A Predicate object or lambda expression that |
Technical Details
Returns: |
True if any items were removed from the list; otherwise, false. |