Java subSequence() 方法
subSequence() 方法返回一个新的字符序列,它是此序列的一个子序列。
语法
public CharSequence subSequence(int beginIndex, int endIndex)
参数
- beginIndex -- 起始索引(包括)。 
- endIndex -- 结束索引(不包括)。 
返回值
返回一个新的字符序列,它是此序列的一个子序列。
实例
public class Test {
    public static void main(String args[]) {
         String Str = new String("www.codexy.cn");
         System.out.print("返回值 :" );
         System.out.println(Str.subSequence(4, 10) );
    }
}
以上程序执行结果为:
返回值 :codexy

 Servlet 教程
Servlet 教程 JSP 教程
JSP 教程 Maven 教程
Maven 教程 Java  String类
Java  String类