Using Java 8 stream methods to get a max value

前端 未结 5 1236
暖寄归人
暖寄归人 2021-01-22 00:00

I would like to get the max value out of a list using java 8 stream methods.

The structure is the following:

  • I read a csv file and store the data of every
5条回答
  •  隐瞒了意图╮
    2021-01-22 01:01

    Because forEach is a terminal operation. And after you call the forEach on a stream the stream terminates and can't be used again.

提交回复
热议问题