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

Why dynamic loading is used in object-oriented programming?

0 Answers  


What is the difference between an abstract class and interface in java?

0 Answers  


What is super keyword?

0 Answers  


Explain the concept of multiple inheritance (virtual inheritance). Write about its advantages and disadvantages?

0 Answers  


What are the four important foundation concepts of OOP ?

0 Answers   Wipro,






What are the rules to define a functional interface?

0 Answers  


What is abstract method?

0 Answers  


Explain static binding

0 Answers  


What is a final variable?

0 Answers  


What are different types of arguments?

0 Answers  


Explain persistence?

0 Answers  


How do I make sure that an object is released in code such as a connection or file object?

0 Answers   MindCracker,


Categories