title: Java code returning null instead of a string
body: <p>I wrote simple code as below. Basically in <code>setString</code>, I input "Sentence" as the string and in <code>getString</code>, it is supposed to return the string. When I test in Junit, it says that <code>getString</code> is returning null instead of "sentence".</p>
  
  <pre><code>public class MyString implements MyStringInterface{
      public String str;
  
      //Sets the value of the current string
      public void setString(String str){
          str = "Sentence";
      }
  
      // Returns the current string
      public String getString(){
          return str;
      }
  }
  </code></pre>