Answer:
The answer is "Option a"
Explanation:
A method is a technique, that associated with both a message and an object. It includes information, behavior, and actions of an interface defining, how the object can be used, and wrong choices can be described as follows:
- In option b, It includes parameters in the method.
- In option c, It contains a parameter, that may be one or more.
- In option d, It contains one parameter also.
D prevent the formation of rust
Answer:
Variable Where Declared
In Sub1 :
A Sub1
Y Sub1
Z Sub1
X Main
In Sub2:
A Sub2
B Sub2
Z Sub2
Y Sub1
X Main
In Sub3 :
A Sub3
X Sub3
W Sub3
Y Main
Z Main
Explanation:
In static-scoped languages with nested subprograms, the declaration of a variable is checked with the subprogram, if it is not found, it check within the parent method that called it, it continue until it find a declaration, if no declaration is found, it display an error.
In Sub1, a, y, z is declared there while the declaration of x is found in main.
In Sub2, a, b, z is declared, declaration of y is found in sub1 and declaration of x is found in main.
In Sub3, a, x, w is declared while the declaration of y, z is from the main.