what is local variable and instance variable?
Answers
Answered by
6
Answer:
Local variable - In computer science, a local variable is a variable that is given local scope. Local variable references in the function or block in which it is declared override the same variable name in the larger scope.
Instance variable - In object-oriented programming with classes, an instance variable is a variable defined in a class (i.e. a member variable), for which each instantiated object of the class has a separate copy, or instance. An instance variable is similar to a class variable.
.
Similar questions
World Languages,
5 months ago
English,
5 months ago
Physics,
10 months ago
Social Sciences,
10 months ago
Physics,
1 year ago
Biology,
1 year ago