我有一个如下所示的数组列表。
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
并且我想输出为
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
我尽力使用Java 8流函数来实现这一点,但是无法做到。甚至有可能使用Streams进行此操作,还是我应该蛮力使用(可能是冗长而又不整洁的循环?
您可以使用map
和peek
:
您可以这样做,