I’m trying to implement the matrix multiplication as provided by in Scala for Java but I’m having trouble showing the arrays.
When trying, for example,
println(singleThreadedMultiplication2(Seq(Array(1, 2),
Array(2, 3)),
Array(Array(11, 8),
Array(2, 6))))
it will show [[I@2c79a2e7. How can I show the contents of the array?
Given Array foo you can do:
One little note of why is it so: Array, unlike Seq or most other classes do not overload .toString method, so Object.toString will be used.
EDIT:
Looks like in your code (it depends on the type of singleThreadedMultiplication2 result) you have to write:
To correctly output result.