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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!