Chapter 6 Flashcards
A method is invoked with a(n) ______.
method call
A variable known only within the method in which it’s declared is called a(n) _______.
local variable
The ______ statement in a called method can be used to pass the value of an expression back to the calling method.
return
The keyword _____ indicates that a method does not return a value.
void
Data can be added or removed only from the ______ or a stack.
top
The three ways to return control from a called method to a caller are ______, _______, _______.
return; or return expression; or encountering the closing right brace of a method
Stacks are known as _______ data structures; the last item pushed (inserted) onto the stack is the first item popped (removed) from the stack.
last-in, first-out (LIFO)
An object of class ______ produces truly random numbers.
Secure-Random
The method-call stack contains the memory for local variables on each invocation of a method during a program’s execution. This data, stored as a portion of the method-call stack, is known as the _____ or ______ or the method call.
stack frame, activation record
If there are more method calls that can be stored on the method-call stack, an error known as a(n) _____ occurs.
stack overflow
The _____ of a declaration is the portion of a program that can refer to the entity in the declaration by name.
scope
It’s possible to have several methods with the same name, each operating on different types or numbers of arguments. This feature is called method _____.
overloading