Using Scala array from java

Posted by Grégoire on Stack Overflow See other posts from Stack Overflow or by Grégoire
Published on 2010-06-03T13:07:09Z Indexed on 2010/06/03 13:44 UTC
Read the original article Hit count: 299

Filed under:

Hi

I'm trying to use some library code written in scala from a java program. I have a function that returns an Array (a scala Array) and I thought it would be possible to do

Tree[] = ScalaObject.myScalaFunction()

But the I get this error :

[error] found   : scala.runtime.BoxedArray
[error] required: org.grammaticalframework.Trees.Absyn.Tree[]

What is the correct way to use a scala array in java ?

© Stack Overflow or respective owner

Related posts about scala