what is the difference between object and class
Answer Posted / prema
Class is a template or a plan for creating objects.
For example: For construction of building we need a plan.
Without plan we can't construct building. Here plan acts as
class. Building acts as object.Using the same plan we can
build any number of building.
In the same way we can create any number of objects for the
same class.Class tell whats the object state and behaviour.
Basically class tells what the object should have.
Object is an real world entity, which has something and
which know something. It means ojects has state and
behaviour.State of the object is represented by instance
variable. Behaviours are representd by methods.
| Is This Answer Correct ? | 24 Yes | 2 No |
Post New Answer View All Answers
What is a subsequence of a string?
How do you stop a thread in java?
How does sublist works in java?
How do you join strings in java?
Is alive and join method in java?
Can we start a thread twice in java?
Can we restart a dead thread in java?
What is the file extension for java?
What is set and get methods in java?
List some features of the abstract class.
What is a numeric literal?
What do negative exponents mean?
Is alive in java?
How many ways can we create the string object?
What is variable in java?