StringBuffer
is built into Java and you do not need to import any package. (Its package is java.lang
which is "automatically" imported.)
See: http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html
Check the code below. It runs without any import.
public class StringBufferUse {
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
sb.append("a");
sb.append("b");
sb.append(123);
System.out.println(sb.toString()); /* prints "ab123" */
}
}