Is this better?
public MyClass(String item){
this.item = item;
}
Or this?
public MyClass(String item){
setItem(String item);
}
Or are they the same?
I have been taught both ways, but one professor said that the second method was more secure. I'm not sure why though.