what is difference between class and object?
Answer Posted / renjith
The terms ‘class’ and ‘object’ are absolutely related to one another, but each term holds its own distinct meaning.
The term ‘class’ refers to the actual written piece of code in which the class is defined. The properties of a class
do not change before, during, or after the execution of a program.
The term ‘object’, however refers to an actual instance of a class. Every object must
belong to a class. Objects are created and eventually destroyed – so they only live in the program for a limited time. While objects are ‘living’ their properties may also be changed signficantly.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How can a gui component handle its own events?
Can we override singleton class?
What is a boolean used for?
Why do we override tostring method in java?
What is the use of object and class classes?
What is difference between pointer and reference?
Can we declare a constructor as final?
What is a method in programming?
Is char a method in java?
Are strings immutable in java?
What is the implementation of destroy method in java. Is it native or java code?
how is final different from finally and finalize in java?
What are the high-level thread states in java programming?
Explain the access modifiers for a class, method and variables?
What is super constructor?