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 Practice Java Objects!
You have completed Practice Java Objects!
Preview
See how I solve the challenge!
This video doesn't have any notes.
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
And it certainly happened to me
when I was learning Java.
0:00
So here's how I solve the problem.
0:00
First, we created a new class named cow.
0:03
Then we need to add a closing bracket
down at the bottom.
0:08
Next we'll create a private
0:12
string variable called name.
0:14
Don't forget the semicolon at the end.
0:18
And to make sure
that we will never be able to change it.
0:20
Once it's been said,
we'll also make it final.
0:24
For step three,
we need to add a constructor
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