How can I make custom toString for Array?
Question
I want to be able to write:
val a = Array(1,2,3)
println(a.toString)
And have a meaningfull printout. Is it possible?
Solution
You have to do this:
scala> val a = Array(1, 2, 3)
a: Array[Int] = Array(1, 2, 3)
scala> println(a.deep)
Array(1, 2, 3)
scala>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow