Skip to content

Commit a04cffa

Browse files
alkravalkrav
authored andcommitted
Fixed java error cannot use package as a Object name
1 parent 9cadde0 commit a04cffa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

data/part-6/1-objects-within-objects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,9 +1533,9 @@ public class Main {
15331533
public static void main(String[] args) {
15341534
Gift book = new Gift("Harry Potter and the Philosopher's Stone", 2);
15351535

1536-
Package package = new Package();
1537-
package.addGift(book);
1538-
System.out.println(package.totalWeight());
1536+
Package gifts = new Package();
1537+
gifts.addGift(book);
1538+
System.out.println(gifts.totalWeight());
15391539
}
15401540
}
15411541
```

0 commit comments

Comments
 (0)