I have a list of Fruit objects in ArrayList and I want to modify fruitName to its plural name.
Fruit
fruitName
Refer the example:
@Data @Al
You can use just forEach. No stream at all:
forEach
fruits.forEach(fruit -> fruit.setName(fruit.getName() + "s"));