Java StringBuffer.各种方法都没定义,求解惑~
package String;
public class StringBuffer {
public static void main(String[] args){
StringBuffer strBuffer = new StringBuffer();
strBuffer.append("是不是少什么东西啊?");
strBuffer.append("求助··");
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method append(boolean) is undefined for the type StringBuffer
The method append(String) is undefined for the type StringBuffer
at String.StringBuffer.main(StringBuffer.java:13)
package String;
public class StringBuffer {
public static void main(String[] args){
StringBuffer strBuffer = new StringBuffer();
strBuffer.append("是不是少什么东西啊?");
strBuffer.append("求助··");
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method append(boolean) is undefined for the type StringBuffer
The method append(String) is undefined for the type StringBuffer
at String.StringBuffer.main(StringBuffer.java:13)