例如:
scala> val b = new ArrayBuffer[Int]()
<console>:7: error: not found: type ArrayBuffer
val b = new ArrayBuffer[Int]()
^
我能否使用REPL查找ArrayBuffer的完整路径并导入它?
例如:
scala> val b = new ArrayBuffer[Int]()
<console>:7: error: not found: type ArrayBuffer
val b = new ArrayBuffer[Int]()
^
我能否使用REPL查找ArrayBuffer的完整路径并导入它?
scala.collection.mutable.ArrayBuffer
,因为默认情况下不会导入scala.collection.mutable中的类(和对象)。