Skip to content

Commit 08c24dc

Browse files
xhudikb-studios
authored andcommitted
scala 3 syntax for import
1 parent 5fd5845 commit 08c24dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_overviews/scala3-book/packaging-imports.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ If you’re used to a language like Java, the first class of import statements i
6969
These examples demonstrate some of that flexibility:
7070

7171
````
72-
import users._ // import everything from the `users` package
72+
import users.* // import everything from the `users` package
7373
import users.User // import only the `User` class
74-
import users.{User, UserPreferences} // only import the selected members
75-
import users.{UserPreferences => UPrefs} // rename a member as you import it
74+
import users.{User, UserPreferences} // import only two selected members
75+
import users.{UserPreferences as UPrefs} // rename a member as you import it
7676
````
7777

7878
Those examples are meant to give you a taste of how the first class of `import` statements work.

0 commit comments

Comments
 (0)