java multiple methods and instances
<p>I'm following a series of tutorials on multiple methods and instances. The author didn't elaborate the details about some elements.</p>

<p>Why do you think would he put the method setName in a "public void" and then get the return using the "public String getName". Why didn't he just place the return randomName inside public void and in public void saying method declare the string g?</p>

<pre><code>public class voidvoid {

private String randomName;

public void setName(String name){
    randomName = name;

}
public String getName () {
    return randomName;
}

public void saying () {
    System.out.printf("you are %s", getName());
}


}
</code></pre>
