Why unable to access the String value ?
I would expect the s1 to be "a" but instead its Ljava.lang.String;@d70d7a ?
val it = Iterator("(a,((a,b),1.0))") //> it : Iterator[String] = non-empty iterator
val s1 = it.next.replace("(" , "").replace(")" , "").split(",").toString.split(",")
//> s1 : Array[String] = Array([Ljava.lang.String;@d70d7a)
println("s1 is "+s1(0)) //> s1 is [Ljava.lang.String;@d70d7a