Skip to content

Instantly share code, notes, and snippets.

@cosminpopescu14
Created January 22, 2020 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosminpopescu14/8da3aa6062f99ce17da8ca69814dbd0f to your computer and use it in GitHub Desktop.
Save cosminpopescu14/8da3aa6062f99ce17da8ca69814dbd0f to your computer and use it in GitHub Desktop.
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