Computer Science, asked by kingmaster99, 9 months ago

what is the difference between local variable and instance variable

Answers

Answered by IonicYadav
2

Answer:

Local variables are visible only in the method or block they are declared whereas instance variables can been seen by all methods in the class. Place where they are declared: Local variables are declared inside a method or a block whereas instance variables inside a class but outside a method.

Answered by dsipra024
0

Answer:

Local variables are visible only in the method or block they are declared whereas instance variables can been seen by all methods in the class. Place where they are declared: Local variables are declared inside a method or a block whereas instance variables inside a class but outside a method.

Explanation:

Similar questions