Self-Review Exercises
D.1 Fill in the blanks in each of the following statements:
a) A method is invoked with a(n) _____________.
b) A variable known only within the method in which it’s declared is called a(n) _____________.
c) The _____________statement in a called method can be used to pass the value of an expression back to the calling method.
d) The keyword _____________indicates that a method does not return a value.
e) Data can be added or removed only from the _____________of a stack.
f) Stacks are known as _____________data structures; the last item pushed (inserted) on the stack is the first item popped (removed) from the stack.
g) The three ways to return control from a called method to a caller are _____________, and _____________. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access