Sunday, 6 May 2012

Basic difference between Class and Object

Class:
A Class is a user defined datatype which contains the variables, properties and methods in it. A class defines the abstract characteristics of an object, including its attributes, fields or properties, and the object's methods, operations or features. Collectively, the properties and methods defined by a class are called members.

Object:
Object is an instance of a class. The instance is the actual object created at run-time. The object consists of state and the behavior that's defined in the object's classes.

No comments:

Post a Comment