, . , , .. , , . , , , , main . , , , ( , , ). , , , , (, ). :
final List<int[]> intArrays = Arrays.stream(testarray).collect(Collectors.toList());
final List<Integer> integers = intArrays.stream().flatMap(z ->
Arrays.stream(z).boxed()).collect(Collectors.toList());
unless you add comments like:
final List<int[]> intArrays = Arrays.stream(testarray).collect(Collectors.toList());
final List<Integer> integers = intArrays.stream().flatMap(z ->
Arrays.stream(z).boxed()).collect(Collectors.toList());
As I said, the code is mostly gibberish. Help yourself and everyone who can look at your code and write it in a logical order, no matter what language you use. (And again, please use the comments! You will thank me later.)
source
share