Syntax Quiz 2, Step 11

Assignment:

Insert the statement into the method body.

My solution:

You've already written

public class QuizClass
  {
  private int instanceVar; 
  public void doSomething (String theParameter) 
     { 
     double localVar; 
     } 
  } 
and
System.out.println ("The parameter is \"" + theParameter + "\".");
They go together as
public class QuizClass
  {
  private int instanceVar; 
  public void doSomething (String theParameter) 
     { 
     double localVar; 

     System.out.println ("The parameter is \"" + theParameter + "\".");
     } 
  } 

Common mistakes:

Putting the statement in the wrong place.
All executable statements (like System.out.println(...)) must be inside the body of a method.

Stephen Bloch / sbloch@adelphi.edu