Syntax Quiz 2, Step 9

Assignment:

Insert the local variable declaration into the method body.

My solution:

You've already written

public class QuizClass
  {
  private int instanceVar; 
  public void doSomething (String theParameter) 
     { 
     } 
  } 
and
 double localVar; 
They go together as
public class QuizClass
  {
  private int instanceVar; 
  public void doSomething (String theParameter) 
     { 
     double localVar; 
     } 
  } 

Common mistakes:

Putting the local variable declaration in the wrong place.
Local variables must be declared inside a method body, before they are used.

Stephen Bloch / sbloch@adelphi.edu