Task 8 of 9 · 0 solved · 9 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

4.3 Instance methods — rename in a method

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in addSuffix so that it appends the given text to the dog's name. The method returns nothing.

The program prints Rex Jr — the change made inside the method is visible outside, because both refer to the same object.

Careful: creating a new Dog would not work; the caller would still see the old one.

Your solution