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

Is it possible for yielded thread to get chance for its execution again ?

551


What is a parameter in matrices?

541


What are the pillars of java?

489


what is the constructor and how many types of constructors are used in java?

535


What is a java list?

585






What is the static method?

571


What is the default size of arraylist in java?

507


Why does my function print none?

518


What is codebase?

539


What does || mean in vectors?

478


Does treeset use compareto?

543


Which list is sorted in java?

583


What are the advantages of java over C++?

715


What are the 7 types of characters?

564


Can a class extend 2 classes in java?

556