Advertisements
Advertisements
Question
State True or False.
A local variable can exist outside its method as well.
True or False
Advertisements
Solution
This statement is false.
Explanation:
A local variable cannot exist outside its method. It is created when the method starts execution and is destroyed when the method ends. It can be accessed only within the method where it is declared.
shaalaa.com
Is there an error in this question or solution?
