1、list类型和buffer的自动转换
import scala.collection.mutable.ArrayBuffer
import scala.collection.JavaConverters.asScalaBuffer
import java.util.List
object helloworld {
def main(args: Array[String]) {
val buffer = ArrayBuffer(1,3,4);
val list:java.util.List[Int] = buffer;
println(list);
}
}