COP 3330 Exam 3 Exam with
complete solutions latest version
A method was invoked with a(n) ________ - CORRECT ANSWER-method call
A variable known only within the method in with it's declared is called a(n) __________ -
CORRECT ANSWER-local variable
The ________ statement in a called method can be used to pass the value of an
expression back to the calling method. - CORRECT ANSWER-return
The keyword _________ indicates that a method does not return a value. - CORRECT
ANSWER-void.
Data can be added or removed only from the _________ of the stack. - CORRECT
ANSWER-top
Stacks are known as _________ data structures; the last item pushed (inserted) onto
the stack is the first item popped (removed) from the stack. - CORRECT ANSWER-last-
in , first-out (LIFO)
The three ways to return control from a called method to a caller are _________,
_________ and _________ - CORRECT ANSWER-return, or return expression, or
encountering the closing right brace of a method.
An object of class ________ produces truly random numbers. - CORRECT ANSWER-
SecureRandom
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 _________ of the method call. - CORRECT
ANSWER-stack frame, activation record
BRAINSCAPE1