Introduction
The forEach()
method is part of the Stream
interface and is used to execute a specified operation, defined by a Consumer
.
The Consumer
interface represents any operation that takes an argument as input, and has no output. This sort of behavior is acceptable because the forEach()
method is used