I really love this question! The StringBuffer *does* not override Object's "equals" method whereas String do. Hence when you invoke s1.equals(s2), the equals method of Object is invoked. The equals method of Object just does a shallow compare (which essentially is s1 == s2) and returns false! Hope this helps --
------------------ Hari Gangadharan Out of the turbulance a soft voice spoke to me ... Son smile and be happy things could be worse... I smiled and I was happy and things became worse!
<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
This is my favorite show. And this is my favorite tiny ad: