title: How to convert Java Collection[Int] to Array[Int] in Scala
body: <p>I have a <code>java.util.Treemap[Long, Int]</code> in Scala. What I need to do is convert the values in the Treemap into an Array[Int].</p>
  
  <p>I can either get an <code>Iterator[Int]</code> or <code>Collection[Int]</code> from the <code>TreeMap</code>, but I'm not sure how to convert these into an <code>Array[Int]</code>.</p>
  
  <p>Any suggestions would be appreciated.</p>