What is Object and Class? What are the differences between
Answers were Sorted based on User's Feedback
Answer / jack
simple analogy for this quest is u declare int x;
and u ask diff between int and x;
Object is an instance of a class.......
--when an object of a class is created the memory for
that class is created...
--U can access the class members using the . operator in
your program....but u r not allowed to access the private
and protected members, which can be accessed by the member
Class is the user defined datatype...which contains data
members and member functions.....
|Is This Answer Correct ?||8 Yes||0 No|
Answer / pankaj vashishta
Class is template for creating similar type of entities.
Class doesn't take memory space untill it contains static
In a specific Class, you declare the attributes(field
variables) and its behaviour(functions).
But Class doesn't have any state and identity.
Objects are the real time entity which are created through
their template, thier class.
By real time entity, I mean they would occupy a memory
space in which they will save the values of its atrributes.
These values create a state of an object.
Since Object occupy a space in memory so they have unique
address in memory. This become the identity of an object.
For example : Pen is a class, which has weight and color as
its attribute. They may have behaviour like write().
Still they don't occupy a space in memory.
When I say My pen ,It will be an object of class Pen since
it will have some values for weight like 10 gm and color
like blue. This will occupy some memory to save these
|Is This Answer Correct ?||4 Yes||0 No|
Answer / kalaivani
object-run time entity
class- bind of function & data
|Is This Answer Correct ?||3 Yes||1 No|
Answer / prabhakar
class is a collection of data and member functions.
objcet is instance of a class
|Is This Answer Correct ?||1 Yes||1 No|
Answer / poorna chandar rao
Object and Class both are same there is no difference
bettwen them those are having properties(data) and methods
but small difference beteween them that is objects are
available physically avialable and class is not avialable
class is a bluprint
|Is This Answer Correct ?||0 Yes||3 No|
What's the full form of STL?
How can you overcome the diamond problem in inheritance?
in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C
What is basic concept of oop?
What is class and example?
What is the difference between a mixin and inheritance?
how to write a java program for an output ****0 ***01 **012 *0123 01234
What exactly is polymorphism?
How many human genes are polymorphic?
What is difference between multiple inheritance and multilevel inheritance?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
who is the father of OPPS