jane, not strictly byte-to-byte...depends on how the class in question wants to implement
equals(Object).
One nasty little detail (

)to remember is that while
String has it's own equals(), StringBuffer is left with the raggedly old one it inherited from Object, with the result that:
StringBuffer s1=new StringBuffer("hello");
StringBuffer s1=new StringBuffer("hello");
System.out.println(s1.equals(s2)?"yes":"no"); returns, you guessed it!