what is the difference between local variable and instance variable
Answers
Answered by
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
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
Computer Science,
5 months ago
Math,
5 months ago
English,
11 months ago
Math,
11 months ago
Math,
1 year ago