IT 114: Introduction to Java
Answers to Class 10 Ungraded Quiz

  1. Does every { in a Java program have to have a matching }?
    yes
  2. What is a method?
    a collection of statements with a name that performs a specific task
  3. What are the two components of a method?
    method header and method body
  4. What do you call the code block containing the statements that are executed when the method is run?
    method body
  5. What is contained inside the parentheses, ( ), on the first line of the method definition?
    a list of parameters
  6. What do you call the statement that causes a method to run?
    a method call
  7. Does this statement always have to have parentheses, ( )?
    yes
  8. What do you call variables defined inside the statements of a method?
    local variables
  9. Can other parts of the program see these variables?
    no
  10. What do you call the values inside the ( ) when you run a method?
    arguments
  11. What do you call the special variables inside a method that get their value when the method is run?
    parameters
  12. Where do these special variables get their values?
    from the arguments in the method call