Answers

Question and Answer:

  Home  Senior .Net Developer

⟩ Please explain what is the difference between a class and an object?

In short, a class is the definition of an object, and an object is instance of a class.

We can look at the class as a template of the object: it describes all the properties, methods, states and behaviors that the implementing object will have. As mentioned, an object is an instance of a class, and a class does not become an object until it is instantiated. There can be more instances of objects based on the one class, each with different properties.

 149 views

More Questions for you: