GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 63 of 68    Print  
What is the Difference between Class and Instance

  
Total Answers and Comments: 6 Last Update: October 02, 2009     Asked by: pohme_pohme 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 26, 2008 15:29:11   #1  
gkay09 Member Since: June 2008   Contribution: 2    

RE: What is the Difference between Class and Instance
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.

 
Is this answer useful? Yes | No
June 26, 2008 15:35:03   #2  
gkay09 Member Since: June 2008   Contribution: 2    

RE: What is the Difference between Class and Instance
Adding to the above answer

The instance is the actual object created at runtime

 
Is this answer useful? Yes | No
August 13, 2008 10:46:40   #3  
vikas_3000 Member Since: August 2008   Contribution: 5    

RE: What is the Difference between Class and Instance
Class describes the general behaviour of objects where as instance is the condition of class at a particular time (run time).
 
Is this answer useful? Yes | No
October 27, 2008 17:04:28   #4  
Desve Member Since: July 2008   Contribution: 1    

RE: What is the Difference between Class and Instance
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.

 
Is this answer useful? Yes | No
February 24, 2009 20:59:48   #5  
Gothic Member Since: February 2009   Contribution: 2    

RE: What is the Difference between Class and Instance
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.
 
Is this answer useful? Yes | No
October 01, 2009 06:45:13   #6  
a_l_soni Member Since: October 2009   Contribution: 1    

RE: What is the Difference between Class and Instance
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.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape