标签:位置 sub pac substr package ring 字符串 public sys
package Demo;
public class Demo4 {
public static void main(String[] args) {
String str = "helloworld";
System.out.println(str.substring(5)); //world 从指定位置截取到末尾
System.out.println(str.substring(0, 5)); //hello 截取指定范围的内容
}
}
标签:位置 sub pac substr package ring 字符串 public sys
原文地址:http://www.cnblogs.com/mengliang/p/6833348.html