Quality Testing

Quality is delighting customers

What is meant by Local variable and Instance variable?

Local variables are defined in the method and scope of the variables that have existed inside the method itself.

An instance variable is defined inside the class and outside the method and scope of the variables exist throughout the class. 

Views: 54

Reply to This

Replies to This Discussion

As per quality assurance services, Local and Instance variables are defined as follows:

Local variables are those variables whose scope is only inside the function itself. No other methods of the class will have access to that variable.

Instance variables are kind of variables which are declared inside the class but outside the method and scope of that variable exist throughout the class.


TTWT Magazine





© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service