Is class an Object? Is object a class?

Showing Answers 1 - 16 of 16 Answers

saradha

  • Aug 17th, 2005
 

class is a collection of objects.Whereas objects is not a collection of class. 
eg: car is an class 
tyre,lights,indicators,wheels,seats are objects

  Was this answer useful?  Yes

whenkeys

  • Aug 11th, 2008
 

Class is not a Object simillarly Object cannot be a class. the relationship between this two is that the Object is an instance of the Class.

If Car is a class then running car is the Object [it might comprise of other Objects also]. Simillarly if Heart is a class then beating/pumping heart is an Object.

  Was this answer useful?  Yes

sfjadi2010

  • Apr 10th, 2010
 

In my last interview, the interviewer ask me a question which is similar this one. No, class is not an Object or Object is not a class, we just say that Class is a prototype to creates objects. First we need a prototype then we have object, wihtout prototype or class object cannot be exist.

  Was this answer useful?  Yes

beekal

  • May 25th, 2010
 

A Person is a class and You and me are two objects of Class Person.  We can create hundreds and thousands objects of the class and those hundreds and thousands objects still would be uniquely different from the other object.

A class gives the behaviour(walk, eat) and properties (height, weight)

You could have different height and different weight and can be walking while at the same time I could have diff height and width and be eating, without being dependent to what you are doing.

e.g A Bank Account  a class.

Your account with ac no 123 and my account with ac no 345, are the two objects of Class Bank Account.

Let's say I close my account (destroy my bank account object). Your account remains untouched. i.e You can create numerous hundreds, thousands of object  from class Bank a/c and each still would be quite different from the other.

  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