We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47dd596 commit 61558b6Copy full SHA for 61558b6
_tour/package-objects.md
@@ -37,12 +37,12 @@ object Plum extends Fruit("Plum", "blue")
37
object Banana extends Fruit("Banana", "yellow")
38
```
39
40
-Now assume you want to place a variable `planted` and a method `showFruit` directly into package `gardening`.
+Now assume you want to place a variable `planted` and a method `showFruit` directly into package `gardening.fruits`.
41
Here's how this is done:
42
43
44
// in file gardening/fruits/package.scala
45
-package gardening
+package gardening.fruits
46
package object fruits {
47
val planted = List(Apple, Plum, Banana)
48
def showFruit(fruit: Fruit): Unit = {
0 commit comments