title: Type error trying to overwrite java method in scala
body: <p>I have a class defined in java</p>
  
  <pre><code>public class A {
      List&lt;Group&gt; javaMethod() {
      }
  }
  </code></pre>
  
  <p>and a class in Scala </p>
  
  <pre><code>public class S extends A {
      override javaMethod: List[Group] {
  
      }
  }
  </code></pre>
  
  <p>However, I get an error saying <code>method javaMethod has incompatible type</code>, I'm assuming because of the List that gets returned in the method when it gets overwritten, is of type scala.immutable.List, and the one that is required for the javaMethod is java.util.List.</p>
  
  <p>I don't have access to class A, so I can't change the signature of the function. How can I return a scala List where I'm overriding the method, without getting a type error?</p>
  
  <p>EDIT:
  This will get my list from Java to Scala, but I'm wanting to convert the Java list to the Scala list.</p>
  
  <pre><code>import scala.collection.JavaConversions._
  import scala.collection.mutable.ListBuffer
  asList(ListBuffer(List(1,2,3): _*))
  val x: java.util.List[Int] = ListBuffer(List(1,2,3): _*)
  </code></pre>