public class splitTest {
public static void main(String[] args) {
String s = new String("01:大汽车:lkasjdkl:13213");
String a[] = s.split(":");
System.out.println(a[0]);
System.out.println(a[1]);
System.out.println(a[2]);
System.out.println(a[3]);
}
}
字符串截取
最新推荐文章于 2021-07-27 12:52:20 发布