I have very simple peace of code to multiply 2 same matrix of ones
int[][] matrixA = Stream.generate(()->IntStream.generate(()->1).limit(size).toArr