Insert the assignment statement into the method body.
You've already written
public class QuizClass { private int instanceVar; public void doSomething (String theParameter) { double localVar; System.out.println ("The parameter is \"" + theParameter + "\"."); } }and
this.instanceVar = theParameter.length();According to the quiz, this assignment statement should take place after printing the value of
theParameter
, so we put
it just after the System.out.println(...)
statement:
public class QuizClass { private int instanceVar; public void doSomething (String theParameter) { double localVar; System.out.println ("The parameter is \"" + theParameter + "\"."); this.instanceVar = theParameter.length(); } }