Increment every number in the list by 1.
import public
}
|
Definition and Usage
The replaceAll() method substitutes each item in a list with the outcome of an operation applied to that item. This operation can be expressed through a lambda expression compatible with Java’s UnaryOperator interface.
Syntax
public void replaceAll(UnaryOperator operator) |
Parameter Values
Parameter |
Description |
operator |
Mandatory: A UnaryOperator or lambda expression that acts on each item in the list. |