关于StringBuffer问题
StringBuffer s=new StringBuffer("Hello world!");
s.setCharAt(3, 'i');
StringBuffer s1=s;
为什么要是我StringBuffer s=new StringBuffer("Hello world!");
StringBuffer s1=s.setCharAt(3, 'i');
会提示Type mismatch: cannot convert from void to StringBuffer错误
------解决方案--------------------s.setCharAt(3, 'i');
因为这个方法是set方法,是没有返回值的,是VOID型....没法和StringBuffer划等号的.....