A class contains the declaration of instance variables, not a method. Instance variables store values that must be used by several methods, constructors, or blocks, as well as crucial state information for an object that must be present across the class.
A class's instance-specific variables are known as instance variables. For instance, each new class object you create will contain a copy of the instance variables. The variables that are specified inside a class but outside of any methods are called instance variables. There are a few characteristics of instance variables that you should be aware of. In this article, we'll discuss those. Also covered will be instance variables and their potential uses. Along with discussing some advantages and disadvantages of using them, we'll demonstrate how to declare and initialize them.
To know more about Instance variables visit:
https://brainly.com/question/20658349
#SPJ4