System.out.println(Collections.max(Stream.of(new int[][]{{1, 2}, {3, 4}}) .map(a -> Collections.max(Arrays.stream(a).boxed() .collect(Collectors.toList()))) .collect(Collectors.toList())));