Terminal Operation
Terminal operation are operations that put in the end of the stream.
This operation always execute and terminate the stream.
For example: collect()
, forEach()
, findFirst
, allMatch()...
list.stream().forEach(e -> system.out.println(e));