Solved

Where Can Local Variables Declared Within a Method's Body Be

Question 1

Multiple Choice

Where can local variables declared within a method's 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.

Correct Answer:

verifed

Verified

Related Questions