I\'m new to Java8 and I can\'t use streams to map one array into another 2 dimensional array.
I have one 2-dimensional array which is a pattern:
bool
You can do it like so,
boolean[][] result = Arrays.stream(keys).mapToObj(i -> pattern[i]).toArray(boolean[][]::new);
Since you have Stream after the map stage, you only need to provide an array generator function.
Stream
map