hi, the StringBuffer class does not override the default equals() methods.so it checks for equality of references,which are always different for newly created object. so ur if condition just checks whether sb1==sb2 which is false.hope this helps
~naren<br /> scjp1.4<br /> scwcd1.4
Joined: Aug 03, 2002
Take a look at StringBuffer's API. Look for the equals method...