在spark-shell里面编写Scala代码的时候报了
<console>:30: error: not found: type ArrayBuffer
val result=new ArrayBuffer[Int]
需要导一个包:
import scala.collection.mutable.ArrayBuffer
导的包在代码块的哪儿都行,都可以的,Scala没有固定的导包位置
在spark-shell里面编写Scala代码的时候报了
<console>:30: error: not found: type ArrayBuffer
val result=new ArrayBuffer[Int]
需要导一个包:
import scala.collection.mutable.ArrayBuffer
导的包在代码块的哪儿都行,都可以的,Scala没有固定的导包位置