When you assign the value of a local string into an instance variable of a class, does it create a new object (String)?
public void setNumber(String number){
if(number == null || number.length() != 9)
return;
this.number = number;
}
Do this implicity works like this:
this.number = new String(number);
new String(str)implicitly.