Objects
Last updated
Was this helpful?
Last updated
Was this helpful?
An object is a specific instance of a class.
Bubbles and Rocky are objects, they have state as defined in the brackets, which can be used by the methods/behaviour.
Now we have instances of the class, we can use their methods.
We can ask bubbles and rocky to run, and they will get the message (ie method) and perform that behaviour (run that method)