A method defined in a class can access the class’ instance data without needing to pass them as parameters or declare them as local variables.

A method defined in a class can access the class’ instance data without needing to pass them as parameters or declare them as local variables.


Answer: True. Explanation: The instance data are globally available to all of the class’ methods and therefore the methods do not need to receive them as parameters or declare them locally. If variables of the same name as instance data were declared locally inside a method then the instance data would be “hidden” in that method because the references would be to the local variables.


Java

Learn More Multiple Choice Question :