主题:Stringbuffer的问题
我写了个程序,编译时抛出异常exception in thread "main" java.lang.noclassdeffounderror:Stringbuffer不知道哪有错误,我的程序
public class Stringbuffer{
StringBuffer sb;
Stringbuffer(){
sb=new StringBuffer();
for(char ch='a';ch<='z';ch++)
sb.append(ch);
System.out.print(sb.toString());
}
public static void main(String s){
new Stringbuffer();
}
}
public class Stringbuffer{
StringBuffer sb;
Stringbuffer(){
sb=new StringBuffer();
for(char ch='a';ch<='z';ch++)
sb.append(ch);
System.out.print(sb.toString());
}
public static void main(String s){
new Stringbuffer();
}
}