The implementation of the substring(int beginIndex, int endIndex)
method in JDK 6 is different from JDK 7. This post explains the differences. For simplicity reasons, the substring()
method represents the substring(int beginIndex, int endIndex)
method in this post.