Is class an Object? Is object a class?

Answers were Sorted based on User's Feedback



Is class an Object? Is object a class?..

Answer / kumar rohit

A class is a generalized template from which object
is created based on its various instances,therefore
we can consider a class as an object while vice-versa
is not possible.

Is This Answer Correct ?    4 Yes 0 No

Is class an Object? Is object a class?..

Answer / murthy

A class is neither an object nor an object is a class.
A class is like a blue print for an object.
An object is an instance of a class.

Some people have given the right examples above and some
more goes here:
You can consider a blue print for your house is a class.
You cannot stay in blue print :).
The building built based on the blue print is called an
object. You can stay in it.

Class should be treated like a "data type" and an object
like a instance of that datatype.
for e.g., int i; you can considet int as a class and i as
an instance of an object.

Is This Answer Correct ?    2 Yes 0 No

Is class an Object? Is object a class?..

Answer / vasir

Class is not an object. An object is an entity that is
allocated memory during runtime to do certain operation
whereas Class is just a skeleton or representation of the
object. We say design a class and not create a class. We
can only design a class ( attributes and behaviour ).
In brief we can say class is a Type of an object.

Is This Answer Correct ?    2 Yes 0 No

Is class an Object? Is object a class?..

Answer / subrata

Going by the definition ("object is an instance of a class") - it is clear that object IS A class type (take off "an instance of"). However, the other way round is against the correctness of definition.

Is This Answer Correct ?    1 Yes 0 No

Is class an Object? Is object a class?..

Answer / shambhu gupta

Class is a user defined data type whereas Object can be
veiwed as a variable of class type
For example fruit is a class & mango,apple are different
objects of class fruit.
Class can be a person whereas objects can be any existing
person like Ram ,Shayam,Rahul etc

Is This Answer Correct ?    1 Yes 1 No

Is class an Object? Is object a class?..

Answer / julian c

Stop thinking like programmers saying "Object is a class in Java, c# etc".

I have in front of me a number of Whiffleplops of different colours; black, blue and red.

The black, blue and red Whiffleplops are three different objects. They are also of different sizes and I can play with them.

Do you have a Whiffleplop with you? No? (Why not).

Do you see that Whiffleplop is a CLASS of object that I can define as having two attributes (colour and size) and behaviour (you can play with it)? When you do get a Whiffleplop of any size or colour then you'll have an object, or an instance of the Whiffleplop class. You don;t have to have one for me to define the class though!

Is This Answer Correct ?    0 Yes 0 No

Is class an Object? Is object a class?..

Answer / kaushi

object is an instance of a class or in other words object
is a snapshot(blueprint)of a perticuler class.
class is real world object.

Is This Answer Correct ?    1 Yes 2 No

Is class an Object? Is object a class?..

Answer / reza

Yes, class is an object but an object is not a class.
We can compare class with a factory and object with product.
A factory can be a product of another factory; but a
product can not be a factory.

Is This Answer Correct ?    1 Yes 2 No

Is class an Object? Is object a class?..

Answer / anu

YES class is an object whereas an object is an instance of
a class

Is This Answer Correct ?    0 Yes 1 No

Is class an Object? Is object a class?..

Answer / anirban

Class is an object.
But an object is not a class.

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More OOAD Interview Questions

Explain the implementation phase with respect to oop?

0 Answers  


Can I implement polymorphism using abstract class?

0 Answers   MCN Solutions,


Can you create an instance for an abstract class?

0 Answers  


What are associative classes?

3 Answers   InfoAxon Technologies, Protech,


If a class inherits an interface, what are the 2 options available for that class?

0 Answers  






What is early and late Binding?

0 Answers  


What is the difference between a virtual method and an abstract method?

0 Answers  


If a method definition has been specified in the base class and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?

0 Answers  


What is the difference between abstract & interface?

0 Answers   MindCracker,


What is difference between static and non-static fields of a class?

0 Answers  


When do you prefer to use composition than aggregation?

1 Answers   InfoAxon Technologies, Protech,


How a program can be structured using the concept of object oriented programming?

0 Answers  


Categories