When using String as the param type and return type, I got the same result as you. I guess it was because string is immutable and thus treated as a special case. When using StringBuffer (or other mutable types), instead of String, I got different objects as expected.
[Message sent by forum member 'cf126330']
http://forums.java.net/jive/thread.jspa?messageID=474765