Skip to content

Commit 61558b6

Browse files
authored
use correct package name in package object docs
1 parent 47dd596 commit 61558b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tour/package-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ object Plum extends Fruit("Plum", "blue")
3737
object Banana extends Fruit("Banana", "yellow")
3838
```
3939

40-
Now assume you want to place a variable `planted` and a method `showFruit` directly into package `gardening`.
40+
Now assume you want to place a variable `planted` and a method `showFruit` directly into package `gardening.fruits`.
4141
Here's how this is done:
4242

4343
```
4444
// in file gardening/fruits/package.scala
45-
package gardening
45+
package gardening.fruits
4646
package object fruits {
4747
val planted = List(Apple, Plum, Banana)
4848
def showFruit(fruit: Fruit): Unit = {

0 commit comments

Comments
 (0)