Computer Applications
Why are objects said to be instances of a class ?
Objects & Classes
6 Likes
Answer
A class represents a blueprint based on which actual memory is allocated for data members and methods of a class and it is called an object. So an object gets its own copy of data members and methods based on class details. Hence, objects are said to be instances of a class.
Answered By
5 Likes
Related Questions
Can there be multiple classes for the complete representation of a real world entity ? Give examples.
Why are classes said to be abstractions of or a set of objects ?
Consider the following code fragment assuming that a class namely Student has been defined earlier :
Student stud1;What is above statement doing ?
How is following statement different from statement given in previous question ?
Student stud1 = new Student( );