What is a method? - correct answer ✔a collection of statements that
performs a specific task
What is a void method? - correct answer ✔a method that executes a group
of statements and then terminates, returning no value
EXAMPLE: System.out.println("Hi!");
Why is using methods sometimes called the "divide and conquer" approach? -
correct answer ✔Because methods are commonly used to break a problem
down in to small, more manageable pieces.
What is code reuse? - correct answer ✔Use of a method to perform the
same task at several different places throughout a program.
What is a value-returning method? - correct answer ✔a method that not only
performs a task, but sends a value back to the code that called it.
EXAMPLE: int number = Integer.parseInt("700");
What information is contained in the method header? - correct answer
✔modifiers returnDataType name (arguments)
EXAMPLE: public void displayMessage ()
What is the method body? - correct answer ✔A statement or collection of
statements that are performed when the method is executed