Scala packages can be imported so that they can be referenced in the current compilation scope. The following statement imports the contents of the scala.xml package −
import scala.xml._
You can import a single class and object, for example, HashMap from the scala.collection.mutable package −
import scala.collection.mutable.HashMap
You can import more than one class or object from a single package, for example, TreeMap and TreeSet from the scala.collection.immutable package −
import scala.collection.immutable.{TreeMap, TreeSet}