Computer Science, asked by sanchana33, 10 months ago

what is local variable and instance variable?​

Answers

Answered by sahap2156
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.

.<Marquee>✌Mark me as brainliest✌</Marquee>

Similar questions