What’s the difference between an object and a class?


#1

Question

What’s the difference between an object and a class?

Answer

An object is an instance of a class. If you have a need to produce many similar objects, you can use a class to set the template for creating those objects, thereby reducing the amount of code you need to write.