what is difference between class and object?
Answers were Sorted based on User's Feedback
Answer / muthusenthil
Class is a template(type) or blue print its state how
objects should be and behave. eg consider a construction
plan which is a class with this description mentioned in a
plan we can constructs 'n' number of buildings of same type.
these buildings are consider to be an objects come under
same type of that plan.
Object is defined as a software construct which binds data
and logic or methods(functions)together.
Is This Answer Correct ? | 230 Yes | 47 No |
Answer / dara
Class is templet for an object.Object is an instance of a class.
Is This Answer Correct ? | 189 Yes | 28 No |
Answer / lolo
OBJECT
A software bundle of related state and behavior. Stores the
state in fields and express its behavior through methods.
The methods operate on an object's internal state. Object
is a Physical reality.
CLASS
We can define a class as a blueprint from which the
individual objects are created. Uses a new operator to
create the instance of the class. Class is a logical
construct.
Is This Answer Correct ? | 84 Yes | 22 No |
Answer / priyanka tayde
clas is a user defined data type and object is a basic run
time entity of class. class contain any no of object but
object belongs to single class.
Is This Answer Correct ? | 71 Yes | 9 No |
Answer / devarathnam c,kotagudibanda(po
Hi... Class is a blue print of an object,which is non-live
entity.
Object is instance of class,which is a live entity.
example: Employee is a class
Fruit is a class
but
DEVARATHNAM is an object
ROSE is an object
Is This Answer Correct ? | 99 Yes | 39 No |
Answer / p govind rao
1) class is a group of a object that shares common
property.
2) class is a collection of methods and functionality.
3) Object is real time entity of class or it is a
instance of class.
4) A Class is a blueprint of an object or we can say
that its a template of an object.
5) Class –Classe defines object, Object -Object can't
define classes.
6) Class -Object properties can access by class
instance on which that object is residing.
7) Object-Should be belonging to any of the class.
8) Object - Can created and destroyed as your
necessity.
9) Class-One class can define any no of Object Class
is templet for an object.Object is an instance of a class.
10) Class cannot be passed as a prameter or
orguments,But object can be passed as argument or parameter.
Is This Answer Correct ? | 57 Yes | 2 No |
Answer / n71423
In an Object Oriented world, 'Human being' is a CLASS
whereas, all of us are objects! :-)
Is This Answer Correct ? | 56 Yes | 22 No |
Answer / revansiddappa p.h.
Class:
Is another kind of data type in oops like structure.
It is static in nature during program execution.
Object:
It is like variable of type class for accessing member
variables and methods.
Objects are dynamic in nature during program execution.
Can be constructed and destroyed.
Is This Answer Correct ? | 44 Yes | 14 No |
Answer / kabita
class is a blueprint/framework which has no physical
existance and it is collection of similar properties and
behaviour of objects.
object is nothing which has physical existance, own
behaviour and properties.
it is also known as instance of class.
ex:Employee is a class and ram is aobject of this class.
Is This Answer Correct ? | 42 Yes | 12 No |
Answer / shashank
Class cannot be passed as a prameter or orguments,
But object can be passed as argument or parameter.
Is This Answer Correct ? | 14 Yes | 5 No |
What is the size of an array?
Explain exception chaining in java?
What is the life cycle of Servlet?
Can we declare register variable as global?
which one the better thread emplemented thread or extended ?
When is the finalize() called?
Give a brief description of java socket programming?
What is int short for?
What are the approaches that you will follow for making a program very efficient?
What is instanceof keyword?
what is check p object in java
Difference between JVM and JRE?