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
Why is method overloading not possible by changing the return type in java?
Can I override protected method in java?
how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)
What is the association?
How do you remove an object from an arraylist in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is package protected in java?
What are identifiers in java?
What is an class?
What is the difference between access specifiers and access modifiers in java?
what do you understand by the term string with respect to java?
When do we use synchronized blocks and advantages of using synchronized blocks?
How do you start a new line in java?
Explain covariant method overriding in java.
What is broken and continue statement?