This course will be retired on July 31, 2026. We recommend "Practice Java Objects - Word Guessing Game" for up-to-date content.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Java Objects (2016)!
You have completed Java Objects (2016)!
Preview
You can protect your variables from re-assignment using the final keyword
Learn more
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
explain that a character name is
required to create a new Pez dispenser.
0:00
And after it's been created,
you currently can't change that character,
0:01
which was exactly what we
were intending to convey.
0:05
Because we're modeling
what happens in real life.
0:08
Getting so
close like we just talked about though.
0:11
What if someone on our team doesn't
know that these heads can't be changed.
0:14
And they come in and write a new method
that does just that, it changes the head.
0:19
No, we'd hopefully,
catch that in a review of their code, but
0:23
we can do better than that.
0:26
Let's simulate the scenario and
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up