substring(int beginIndex,int length)的参数

public String substring(int beginIndex,int length)。
      返回一个新字符串,它是此字符串的一个子字符串。该子字符串从指定的 beginIndex 处开始, length:表示子字符串的长度。

      参数:
  beginIndex - 开始处的索引(包括)。
  endindex 结尾处索引(不包括)。

  返回:
  指定的子字符串。

    示例:

 String str = "ABCDEF";

String str1 = str.substring(2, 4);

  返回 CD

原文地址:https://www.cnblogs.com/Mr-Clint/p/3561177.html