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


Please Help Members By Posting Answers For Below Questions

What is anagram word?

524


Explain the hierarchy of java exception classes?

601


What is unicode full form?

557


What is java oops?

561


What is reverse function?

576






What is type safety in java?

491


What are the wrapped, classes?

601


What is variable declaration and definition?

545


What is methods in java?

516


What do you mean by default constructor in java?

581


What is the use of parseint in java?

539


Can a constructor call the constructor of parent class?

541


What is the purpose of garbage collection in java?

657


Is zero a positive integer?

537


Is call by reference possible in java?

540