182k views
1 vote
Local variables:A. Lose the values stored in them between calls to the method in which the variable is declared

B. May have the same name as local variables in other methods
C. Are hidden from other methods
D. All of the above

User Tisha
by
5.5k points

1 Answer

3 votes

Answer:

All of the above

Step-by-step explanation:

A local variable is a variable which is declared within a method or is an argument passed to a method, it scope is usually local (i.e. it is hidden from other method). it can also have the same name as a local variable in another method and it loses the values stored in them between calls to the method in which the variable is declared. So all the option listed above are correct.

User Luke Sweeney
by
6.1k points