split:用for循环时不要忘记是数组名.length
package com.aaa; //split的用法把指定的字符串按指定的分割符进行分割,然后返回字符串 数组 public class fgsd { public static void main(String[] args) { String a = "this is my subject";// 结果显示少了个字母。对头了 String b[] = a.split(" m", 23); for (int i = 0; i < b.length; i++) { System.out.println(b[i]); } } }