Originally posted by Chinmay Bajikar:
Hi,
Have a look at this code snippet,
What should ideally happen?
I didnt find any equals() implementation in the StringBuffer class.
I am using JDK 1.4.2.
Answer
------
== symbols used to compare the content(string)in a object.
but .equals()method is used to compare the string or stringbuffer object;
so sbuf,dbuf or different object, so that the result is sbuf!=dbuf