Engaged Employer
What is the difference between an object and a class?
Anonymous
A class is an object, but an object is not always a class. In order for something to be considered an object is must meet two criteria. First, it must have state. Second, it must have behavior. Take for example a bicycle. A bicycle is an object because it has state (e.g. color, weight, length) and it ALSO as behavior (e.g. pedal down, pedal up, change gear), therefore it is considered an object. However, a class is the blueprint for describing the bicycle object. Each bicycle is an "instance" or "object" created from the class, bicycle.
Check out your Company Bowl for anonymous work chats.