Answer :
Instance variables are variables that are declared inside a class but outside of constructors, methods, or blocks.
What is Instance variables?
- A variable declared in a class—i.e., a member variable—for which each instantiated object of the class has a separate copy, or instance, is referred to as an instance variable in class-based, object-oriented programming.
- While a class variable and an instance variable are similar in nature, the latter are not static. Instance variables are variables that are declared inside a class but outside of constructors, methods, or blocks.
- When an object is formed, instance variables are produced as well, and they are available to all of the class' constructors, methods, and blocks. A variable's instance may get access modifiers.
- Despite certain similarities, an instance variable is not a class variable. The attribute belongs to a certain class (or class property, field, or data member).
- A class may have both instance methods and class methods; the distinction between instance and class members is the same for methods (also known as "member functions").
- For the duration of the ownership of the object, each instance variable remains in memory.
To Learn more About Instance variables refer To:
https://brainly.com/question/28265939
#SPJ4