EDIT Thanks for the prompt responses. Please see what the real question is. I have made it bold this time.
I do understand the difference between ==
Would you expect "abcde".substring(1,2) and "zbcdefgh".substring(1,2) to yield the same String object?
They both yield "equal" sub-strings extracted from two different Strings, but it seems quite reasonable that tehy are different objects, so == sees them as different.
Now consider when the substring has length 0, substring(1, 1). It yields a zero length String, but it's not surprising that the "abcde".substring(1,1) is a different object from "zbcdefgh".substring(1,2) and hence at least one of them is a different object from "".