ListStr.substring(11,11)  结果显示为:空
你的起始位置和结束的位置一样
那么当然取不到string了

解决方案 »

  1.   

    substring前面的一个参数包括
    后面的一个参数不包括
      

  2.   

    一点也不怪啊,汉字对于substring来说是占一位的,虽然占两个字节码。所以运行的结果是完全正确的!
      

  3.   

    String.substring(int beginIndex,int endIndex)
    所得到的字符串为beginIndex开始,到endIndex为止,但不包括endIndex所在的那个字符
      

  4.   

    The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.