I've used the scala worksheet in InteliJ and have run across a problem where the right-hand side (REPL-like output) shows what appears to be a namespace or memory address instead of the useful-to-a-human literal value.
In the scala REPL (not IntelliJ) the following is quite sane
scala> val nums = new Array[Int](10)
nums: Array[Int] = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
However, in the Scala worksheet the same yields a not-so-useful output
nums: Array[Int] = [I@1a2a52bf
After some light googling and reading I tried the following
val nums = new Array[Int](10)
nums
nums.toString()
nums.mkString(", ")
Which output
nums: Array[Int] = [I@1a2a52bf
res0: Array[Int] = [I@1a2a52bf
res1: String = [I@1a2a52bf
res2: String = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
There's got to be a simple solution or explanation for this that I'm missing. Has anyone run across this and fixed it before?
Here's a worksheet screenshot for reference: