This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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...