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.

A

Computer Science & Information Technology

You might also like to view...

WordArt color styles CANNOT be modified

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following statements is false?

a. Always try to localize the effects of changes to a class’ data members by accessing and manipulating the data members through their set and get functions. b. Services useful to the client should typically be provided in the class’ private interface. Change is the rule rather than the exception. You should anticipate that your code will be modified. c. Providing public set and get functions does allow clients of the class to access hidden data, but only indirectly.

Computer Science & Information Technology