I tried to convert scala list to java list via the following snippet code:
val obj=Array("aaa","bbb")
val output = obj.asInstanceOf[java.util.ArrayList[String]]
But I got the following exception: Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.util.ArrayList. Please help, thanks in advance.