Chapter 4 Book Quiz Flashcards
This type of method does not return a value.
void
This appears at the beginning of a method definition.
header
The body of a method is enclosed in .
curly braces { }
A method header can contain .
method modifiers
the method return type
the method name
a list of parameter declarations
A value that is passed into a method when it is called is known as
a(n)
argument
A variable that receives a value that is passed into a method is
known as a(n)
parameter
This javadoc tag is used to document a parameter variable.
@param
This javadoc tag is used to document a method’s return value
@return
This statement causes a method to end and sends a value back to
the statement that called the method
Return
TRUE OR FALSE: You terminate a method header with a
semicolon.
False
TRUE OR FALSE: When passing an argument to a method, Java
will automatically perform a widening conversion (convert the
argument to a higher-ranking data type), if necessary
True
TRUE OR FALSE: When passing an argument to a method, Java
will automatically perform a narrowing conversion (convert the
argument to a lower-ranking data type), if necessary.
False
TRUE OR FALSE: A parameter variable’s scope is the entire
program that contains the method in which the parameter is
declared.
False
TRUE OR FALSE: When code in a method changes the value of a
parameter, it also changes the value of the argument that was
passed into the parameter
False
TRUE OR FALSE: When an object, such as a String , is passed
as an argument, it is actually a reference to the object that is
passed
True