Question: 7. Where can local variables declared within a methods body be used? a. Only in that method between the line in which they were declared
7. Where can local variables declared within a methods body be used?
a. Only in that method between the line in which they were declared and the closing brace of that method.
b. Same as (a), but not within while or if statements.
c. Only within while or if statements within the method in which they were declared.
d. Anywhere within the class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
