是否创建StringBuffer testing = null;
testing = new StringBuffer("Thread Safe ");
在静态方法中。每次有多个线程同时调用该函数时,是否每次都会对线程缓冲区的相同引用进行修改。
public static StringBuffer test(String string) {
StringBuffer testing = null;
testing = new StringBuffer("Thread Safe ");
return testing;
}