I fixed the problem. I now know what to do. I figured it out.

private String name;

public void setMethod(String name2)
{
name = name2;
}

public String getMethod ()
{
return(name);
}