What is the Difference between Class and Instance

Questions by pohme_pohme

Showing Answers 1 - 18 of 18 Answers

gkay09

  • Jun 26th, 2008
 

A Class is actually a blueprint or a representation of how an Object has to be instanciated. Whereas an Object is called as the Instance of a Class.

For Eg:
  Class can be assumed as a blueprint of a car, describing how it has to look, how it has to work, so on..
  Whereas the Object is the real car.

vikas_3000

  • Aug 13th, 2008
 

Class describes the general behaviour of objects where as instance is the condition of class at a particular time (run time).

  Was this answer useful?  Yes

Desve

  • Oct 27th, 2008
 

A Class is a generalization about things (objects) describing their properties, functions, etc.

An object is an instance of a Class in an specific point of time with different values, that represent the STATE of the object.

  Was this answer useful?  Yes

Gothic

  • Feb 24th, 2009
 

The Class is a blueprint which holds the code, but the instance is the real object inside the memory so we can access its properties and methods in the Run-time.

  Was this answer useful?  Yes

a_l_soni

  • Oct 1st, 2009
 

Class contains the declaration and definition of all of it member variables and the member functions, along with their respective access specifiers. A Class remains same for all of it's objects or instances.


Object is a mere instantiation of a class. All the member variables and the member functions of a class are used via the object, except the static ones. For every instance/object created of a class a different set of member variables and function references is created. Thus each object has it's own set of member variables. when a function of a class is called on an object, of that class, what all changes/operations/updations are done are specific to that object. Static member variables and static functions are exceptions to this.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions