标签:element reduce pretty turn efficient print code ted return
Do a reduction that simply returns the current value:
Stream<T> stream;
T last = stream.reduce((a, b) -> b).orElse(null);
Most efficient way to get the last element of a stream
标签:element reduce pretty turn efficient print code ted return
原文地址:http://www.cnblogs.com/yuyutianxia/p/6844773.html