title: Passing Java array to Scala
body: <p>Although I've been using Scala for a while and have mixed it with Java before, I bumped on a problem.</p>
  
  <p>How can I pass a Java array to Scala? I know that the other way around is fairly straightforward. Java to Scala is not so however.</p>
  
  <p>Should I declare my method in Scala? </p>
  
  <p>Here is a small example of what I'm trying to achieve:</p>
  
  <p>Scala:</p>
  
  <pre><code>def sumArray(ar: Array[Int]) = ...
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>RandomScalaClassName.sumArray(new int[]{1,2,3});
  </code></pre>
  
  <p>Is this possible?</p>