Comment
Comment by eranation
A friend of mine was actually asked this in an interview (how does substring works). The initial idea of taking an advantage of the immutability of an object was nice, but it turns out to be a big GC issue if your original string is extremely large.