232k views
3 votes
What is the difference between a class and an object?1.The Objects are instances of classes. The class is the general template, and 2. The object is the specific version. Classes are instances of objects. 3. The object is the general template, and the class is the specific version. 4. A class has a run method or main method but an object does not.

1 Answer

3 votes

Answer: The Objects are instances of classes. The class is the general template

Step-by-step explanation:

A class is a template for defining objects. It clearly states the names and types of variables that can exist in an object, A class can be thought of as a "type", with the objects being a "variable" of that type.

User Visruth
by
5.9k points