Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does the novice Scala language simply realize the conversion from string array to double array?
How does the novice Scala language simply realize the conversion from string array to double array?
(This extremely simple code is as follows)

val strArray: Array[String]

//Here are some codes for reading strings from files to arrays.

Val doubleArray: Array[Double] = new array [double] (strange. length).

var i=0

for(each str & lt; -strArray){ double array(I)= eachstr . to double; i+= 1}