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 is web.xml?and its use?
perpare on factorypattern,linklist wothout using collection, (multitharding ie create producer/customer therad producer create Queue continuesly,consumer consume queue, consumer wait if queue is full,producer wait if queue is empty),diff betn sleep(1000)&wait(1000) these r the main Q ask in huawei(2008)
How many types of exception can occur in a java program?
Need 2+ yrs experienced java techinical question papaer for company Iflex
Explain the pointers in Java?
What is the purpose of the file class in java programming?
Why parameters should be passed by reference?
What is the life cycle of Thread ?
12 Answers HCL, Varnar Softech,
Why string is called as immutable?
What are the two types of exceptions in java? Which are the differences between them?
Explain the difference between protected and default access.
can we override the main() method in java????
3 Answers Vimukti Technologies,