title: How to iterate over array elements in scala
body: <p>Heads up, I'm new to Scala</p>
  
  <pre><code>object ch3
  {
    def main(args: Array[String]): Unit =
    {
      var foo =  Array (scala.io.StdIn.readLine().split(" ").map(_.toInt))
      foo.foreach(println)
    }
  }
  </code></pre>
  
  <p>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?</p>
  
  <p>The problem is that when I try to print the array elements, I get this value [I@7ff9c904. </p>