GIAC
GSSP-JAVA · Question #92
GSSP-JAVA Question #92: Real Exam Question with Answer & Explanation
The correct answer is A. myClass can access only final variables.. See the full explanation below for the reasoning.
Question
You work as a Software Developer for TechnoZen Inc. You create an application using Java. You define a method, named myMethod. You also define a class, named myClass, within myMethod. Which of the following rules governs the access to the variables of the enclosing method?
Options
- AmyClass can access only final variables.
- BmyClass can access only static variables.
- CmyClass can access only transient variables.
- DmyClass can access any variable.
Community Discussion
No community discussion yet for this question.