Advertisements
Advertisements
Question
Variables which are defined in a method are called ______ method.
Options
local
formal
actual
argument
MCQ
Fill in the Blanks
Advertisements
Solution
Variables which are defined in a method are called local method.
Explanation:
Variables declared inside a method are known as local variables. They are created when the method begins execution and are completely destroyed as soon as the method exits, meaning they cannot be accessed from anywhere else in the class.
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Encapsulation - Exercises [Page 148]
