Consider that the length of an empty String is zero. So we can find a zero-length substring at
any index of any sample String -- including the index equal to the sample String's
length (that is, the index
following the final character in the String). Note that it would be impossible for this final index to denote the beginning of any substring with a length greater than zero.
Also see
this topic in our
SCJP FAQ, which deals with a similar concept.
[ April 09, 2007: Message edited by: marc weber ]