Consider the following in REPL
scala> val a = "1 2 3"
a: String = 1 2 3
scala> a.split(" ")
res0: Array[String] = Array(1, 2, 3)
Consider the following in compiler
val s = readLine()
println(s.split(" ")) // outputs [Ljava.lang.String;@5ebec15
println(s.toList) // outputs List(1, , 2, , 3)
Why is there different output for the same function, namely
Array(1, 2, 3)
vs
[Ljava.lang.String;@5ebec15
I would assume both have the same output
Am I missing something