Created
January 22, 2020 06:07
-
-
Save cosminpopescu14/8da3aa6062f99ce17da8ca69814dbd0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][][] threeDimArr = { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }; | |
var flattenedArray = Arrays.stream(threeDimArr) | |
.flatMap(Arrays::stream) | |
.flatMapToInt(Arrays::stream); | |
flattenedArray.forEach(System.out::println); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment