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 Interfaces in Java!
You have completed Interfaces in Java!
Preview
In this video we'll create and implement the 'Chattable' interface!
Related Links
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
First, we need to make an interface
to hold the chat method.
0:00
To do this,
I'll right click on the package, pick New,
0:00
Java class, then I'll name it Chattable.
0:05
Change the kind from class to interface,
and hit Okay.
0:11
Now that I've got my interface, inside
I just need to declare the chat method.
0:16
So String chat, and there we go.
0:22
But before we move on,
just a few quick notes.
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