I have a Java code calling Scala method.
Java side code:
List<String> contexts = Arrays.asList(initialContext);
ContextMessage c = ContextMessage.load(contexts);
Scala side code:
def load(contexts: List[String]) = ...
contexts foreach context =>
In this case, I have scala.collection.immutable.List<String> cannot be applied ... error message.
I also need to make the type of contexts as general as possible (i.e., Seq) as the load method iterates over the given collection object to process something.
def load(contexts: Seq[String]) = ...
How to solve the two issues?

JavaConversions? This is the standard way to communicate between Java and Scala for collectionsasScalaBuffer.Listbecause it has a particular meaning and is associated to specific constructs in Scala