分配java变量的最佳方式是什么?有什么区别?看到这个;
public class Test {
private String testString;
//getter & setter here.
public void testMethodOne() {
this.testString = "Hello World!";
}
public void testMethodTwo() {
testString = "Hello World!";
}
public void testMethodThree() {
setTestString("Hello World!");
}
}
哪个最好, this.testString = "xxx"或testString = "xxx"或setTestString("xxx")?