How to reasing and increase the value of string variable : Thank you for your attention, I have the next example in C++:
 this->name=new char[strlen(nom)+1];
So, I want to know how can I implement this example in java?
the class have a :
private String name;
and I want to implement this method:
public void setNombre(String nom)
I try to do: this.name= new String(nom.length()+1);


In  C++:
this->name=new char[strlen(nom)+1];
I try to do:
this.name= new String(nom.length()+1);


