What is the purpose of instance?

An instance variable reserves memory for the data your class needs . Let’s assume you want to add a place for a string or int variable. You can use an instance variable to reserve that memory for the lifetime of the object. Each object will receive unique memory for its variables.

Read more

Which is the instance of class?

In languages that create objects from classes, an object is an instantiation of a class. That is, it is a member of a given class that has specified values rather than variables . In a non-programming context, you could think of “dog” as a class and your particular dog as an instance of that class.

Read more