what is difference between class and object?
Answers were Sorted based on User's Feedback
Answer / ayush
collection of objects is class.
when object is a instance of class
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / hamid khan växjö swe
Actually object is an obstraction of something in a problem
domain which reflecting the capabilities of a system to
keep information about it.
Is This Answer Correct ? | 25 Yes | 18 No |
Answer / deepak
class is a collection of its instance members like
variables and method. Objects are declared in the class.
Objects are nothing but a entity which keeps the refrence.
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / ovn
•class is collection of objects.object is a real world
entity.
Class is template for an object and object is a instance of
a class.
•Class defines object but object cannot define a classes.
•Class cannot be passed as a parameter or arguments, but
object can be passes as parameter or argument.
•Object should be belonging to any of class.
•Object can create or delete as your necessity.
•Attributes and behaviors of class can access with the help
of objects.
attribute and beheviours of class can access with the help
of objects.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / deen muhammad
I think a class is the superset of an object and object is
subset of a class.
A class contain so many objects but an object only belongs
to one class
example: A human being is a class while its body parts are
the objects of that class.
Is This Answer Correct ? | 11 Yes | 8 No |
Answer / tamanna yesmin(jagannath unive
Objects contain data and code to manipulate that data where
the entire set of data and code of an object can be made a
user defined data type using the concept of a Class.
A class
may be thought of as a"data type" and an object as
a"variable"of that data type
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / maurya
class is a totally logical perseption while we r making a
class we think only WHAT and HOW. but an object is fully
physical perseption when we create an object we get th
physical entity of class. object has its existance but a
class dont.
through WHAT of a class we define state ie. what should be
in my object and through HOW we define behavior of object
ie. how and what function perform on my object to change
its behavior.
an object is actually type of class.....!!
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / malathi
classes is a combination of member function & data member
&methods into a single unit.It is also known as data
encapsulation.
objects is a variables to the class or instance of a
class.It is also known as data abstraction.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / santosh
OBJECT:-instance of class is called object.
CLASS:-group of object is called class.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / zishan shaukat
I think class is a room full of tables and chairs with n
number of students sitting inside it and a teacher teaching
them something on the blackboard.
Wheras individual commodities like table ,chair blackboard
chalk pen and paper are objects.
Is This Answer Correct ? | 2 Yes | 0 No |
What are null interfaces? Give some examples?
How many bytes is a unicode character?
What is the use of static methods?
What is overloading and overriding in java?
How will you override default serialization mechanism in java
What is the difference between hashmap and hashtable? What is an interface?
What is appletviewer?
What are the elements of java?
What is a serializable interface?
What is the generic function?
Explain runtime exceptions?
How does serialization work