Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
What is an Instance?1:22 with Amit Bijlani
Lets do a quick recap of the syntax and gain an understanding of instances.
Let's do a quick recap of the technical terms covered in the previous video.
Remember, as a programmer it's important that you know these terms,
as they will come in handy when you're reading the quizzes, code challenges, and
However, beyond Treehouse, you will find them useful while reading blogs,
books, or even talking to fellow programmers.
A struct allows you to create a new data type like int, string, array, et cetera.
The basic syntax starts with the keyword struct followed by the name of
the struct which should be capitalized.
A struct can have properties.
These properties are known as stored properties, because they store values.
When creating a variable using the new data type,
you create an instance of this new data type.
Which us back to the question.
What is an instance?
Going back to our original example of a struct being a blueprint for a car.
We have attributes like colors, doors, wheels and
behaviors like start car, open door, open trunk.
Once we have the blueprint we can create an actual car.
The car created from the blueprint is known as an instance.
You need to sign up for Treehouse in order to download course files.Sign up