Which character do you use instead of " * " for importing all the names of a package or class?
Explanation
Get an explanation when it's available:
Theory
  • Import clauses
    An import clause has the form import p.X where the import expression X determines a set of names of members of p which are made available without qualification.
    import p._	// all members of p (this is analogous to import p.* in Java).
    import p.x	// the member x of p.
    import p.{x => a}	// the member x of p renamed as a.
    import p.{x, y}	// the members x and y of p.
    import p1.p2.z	// the member z of p2, itself member of p1.
     
    Furthermore, the clause import p1._, p2._ is a shorthand for import p1._; import p2._. Implicitly imported into every compilation unit are, in that order:
    • the package java.lang,
    • the package scala,
    • and the object scala.Predef.
    Members of a later import in that order hide members of an earlier import.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Scala
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести