Bummer! That Track couldn't be located. Perhaps one of the Tracks below is what you're looking for?
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!
You have completed Java Objects!
Preview
Access level modifiers such as public and private help to explain our intent.
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
We made a field
that exposes the character's name.
0:00
And not only can we access the field
to get the current value,
0:01
but we can also change it.
0:04
Now, in real life,
we can't really change the character
0:06
of a Pez Dispenser
after it's been created, can we?
0:08
Like I can't pop off Donnie's
head here and swap it for this Gabby head.
0:12
Yet, as you saw,
0:16
you can do exactly that with the newly
created object that we just made.
0:17
We never want people to misuse the object
that we allowed them to create.
0:22
But it's kind of only us to blame.
0:25
We allowed that to happen.
0:27
We should make it as clear as possible
to consumers
0:29
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