What is the difference between instance,object,refference,class.

Give the answer

Showing Answers 1 - 6 of 6 Answers

kailash

  • Oct 18th, 2005
 

Class       It is a logical construct . it is a logic abc.class in hard disk

              object when this class is in RAM

Instance    The values of data member at any given time of any

                 object

Object       The run time entity of the class

Reference   The memory location we use to refer the object 

                

Satya Dev

  • Nov 8th, 2005
 

Hello Friend,

A class is known as user defined referencive data type cause:

  &nbs

  Was this answer useful?  Yes

priya

  • Dec 25th, 2005
 

Class : A class is a user defined data type with set of data members & member functions

Object : An Object is an instance of a class

Reference : A reference is just like a pointer pointing to an object

Instance :This represents the values of data members of a class at  a particular time

Sarje

  • Aug 19th, 2009
 

Class : A class is category of the object (any real entity) and acts as blueprint to create such object.

For example if you want to
develop an application for any company then its employee will be your object and all the properties of the employee like name, contact number, address, salary and code to calculate salary etc will make a class. Now this blueprint (class) will be used to create object which will represent an unique employee of the firm.

Now since the class defines properties and behaviours of the object so it a logical entity.

Object and instance both are same when you creating an object or instance of the class means you are now giving real values to the defined properties in the class.


Reference
: when you create an object it means values are stored in the memory at any location this location more or less reference to the object.

  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