i came across this ques in RHE book,
code:
String s="abcde";
StringBuffer s1=new StringBuffer("abcde");
if(s.equals(s1))
s1=null;
if(s1.equals(s))
s=null;
the compilation succeds,
actually, we can't compare String to a StringBuffer. If we do, it would return false,
then how the compilation succeds without giving any exception.
let me know this
swarna