title: Assign instance variables with local variables - Java
body: <p>When you assign the value of a local string into an instance variable of a class, does it create a new object (String)?</p>
  
  <pre><code>public void setNumber(String number){
      if(number == null || number.length() != 9)
          return;
      this.number = number;
  }
  </code></pre>
  
  <p>Do this implicity works like this:</p>
  
  <pre><code>this.number = new String(number);
  </code></pre>