+ 1

Why is an object called an instance of a class?

7th Sep 2018, 4:47 PM
Shreyansh Jaiswal
Shreyansh Jaiswal - avatar
3 Réponses
+ 4
Instance means that an area of memory is reserved for a value and the address is referenced to some name. So when you instantiate a class, you create an area of memory (instance) and addresses this area with a name, who will be the object
7th Sep 2018, 5:02 PM
Alexander Santos
Alexander Santos - avatar
+ 2
from Google: instance noun 1. an example or single occurrence of something. An object is a single occurrence of some class
7th Sep 2018, 4:52 PM
Dan Walker
Dan Walker - avatar
+ 2
object is like an exact copy of the class. object has all the function and variables of the class it represents
7th Sep 2018, 4:52 PM
‎ ‏‏‎Anonymous Guy