A flow represents a stream of values that are computed asynchronously. The Flow interface allows the flowing elements to be collected, which means handling each element as it reaches the end of the flow (collect for Flow is like forEach for collections).

Get hands-on with 1400+ tech skills courses.