Explain when should we make an instance variable private.- The variables which are defined within the class are known as instance variables. - Each instance of this class contains its own copy of these variables. - These variables can be declared as public,private or default. - This variable can be declared as private to promote information hiding so that no other object can access them.
|