3.1.1.11 Parameters of subroutines. Flashcards
1
Q
How do we pass an argument?
A
In java methods, arguments are passed by value. When invoked, the method receives the value of the variable passed in.
2
Q
Outline passing data through parameters when the argument is of reference type.
A
Pass-by-value means that the method cannot change the object reference, but can invoke the objects methods and modify accessible variables within the object.
3
Q
Define a subroutine interface.
A
A subroutine interface is the method which allows local variables to be visible in all parts of the program. An example of an interface variable is percentage.