Heads up, I'm new to Scala
object ch3
{
def main(args: Array[String]): Unit =
{
var foo = Array (scala.io.StdIn.readLine().split(" ").map(_.toInt))
foo.foreach(println)
}
}
Scenario: The input contains 3 space separated integers read from stdin, like 1 2 3. How can I iterate over that array and print the elements?
The problem is that when I try to print the array elements, I get this value [I@7ff9c904.