Type in your answers to each of these questions in a file named
prelab04.txt
in your Prelab Questions
directory. Turn in your answers before the
beginning of your laboratory session.
Question #1: A method without a body is called a method ____________.
Question #2: A value that is passed to a method when that method is called is an ____________ to that method.
Question #3: The variables in a method definition that receive values are known as ____________.
Question #4: A value is sent back from a method using the ____________ statement.
public class Prelab04 { public static int twice(int value) { return 2 * value; } }
Code #1: What's the return type of this method?
Code #2: What's the name of this method?
Code #3: What are the parameters of this method?
Code #4: Write a method invocation of this
method with 34
as an argument.
Code #5: Rewrite this method as a method stub.